From 46721bbeb6e91411b406b948c60fe25f3213d4de Mon Sep 17 00:00:00 2001 From: Mihai Branescu Date: Sun, 10 Apr 2016 17:01:54 +0300 Subject: A number of tests for the luaRocks test suite. --- test/testing.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/testing.sh b/test/testing.sh index 106f31cd..93c94334 100755 --- a/test/testing.sh +++ b/test/testing.sh @@ -329,7 +329,6 @@ need() { need_luasocket() { need luasocket $verrev_luasocket; } # Tests ######################################### - test_version() { $luarocks --version; } fail_unknown_command() { $luarocks unknown_command; } @@ -410,6 +409,7 @@ test_download_rockspecversion() { $luarocks download --rockspec validate-args ${ test_help() { $luarocks help; } fail_help_invalid() { $luarocks help invalid; } +test_install_only_deps() { $luarocks install --only-deps "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; } test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; } test_install_with_bin() { $luarocks install wsapi; } fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; } @@ -451,7 +451,9 @@ test_path_lr_cpath() { $luarocks path --lr-cpath; } test_path_lr_bin() { $luarocks path --lr-bin; } fail_purge_missing_tree() { $luarocks purge --tree="$testing_tree"; } +fail_purge_tree_notstring() { $luarocks purge --tree=1; } test_purge() { $luarocks purge --tree="$testing_sys_tree"; } +test_purge_oldversions() { $luarocks purge --old-versions --tree="$testing_sys_tree"; } test_remove() { $luarocks build abelhas ${version_abelhas} && $luarocks remove abelhas ${version_abelhas}; } test_remove_force() { need_luasocket; $luarocks build lualogging && $luarocks remove --force luasocket; } @@ -485,6 +487,9 @@ fail_unpack_invalidrockspec() { need_luasocket; $luarocks unpack "invalid.rocksp fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; } fail_upload_invalidkey() { $luarocks upload --api-key="invalid" "invalid.rockspec"; } +fail_upload_skippack() { $luarocks upload --api-key="invalid" --skip-pack "luacov-${verrev_luacov}.rockspec"; } +fail_upload_force() { $luarocks install lua-cjson && $luarocks upload --api-key="invalid" --force "luacov-${verrev_luacov}.rockspec" && $luarocks remove lua-cjson; } + test_admin_help() { $luarocks_admin help; } @@ -547,6 +552,9 @@ EOF test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; } fail_doc_invalid() { $luarocks doc invalid; } +test_doc_list() { $luarocks install luacov; $luarocks doc luacov --list; } +test_doc_local() { $luarocks install luacov; $luarocks doc luacov --local; } +test_doc_porcelain() { $luarocks install luacov; $luarocks doc luacov --porcelain; } # Driver ######################################### -- cgit v1.2.3-55-g6feb