From ed02691e8b7ce5e500ac1fe3c9c3f894e95b6099 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 26 Mar 2015 01:52:44 -0300 Subject: Add trivial tests for `luarocks upload` --- test/testing.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/testing.sh b/test/testing.sh index f99fd8e3..2c87183f 100755 --- a/test/testing.sh +++ b/test/testing.sh @@ -343,6 +343,7 @@ fail_lint_noarg() { $luarocks lint; } fail_search_noarg() { $luarocks search; } fail_show_noarg() { $luarocks show; } fail_unpack_noarg() { $luarocks unpack; } +fail_upload_noarg() { $luarocks upload; } fail_remove_noarg() { $luarocks remove; } fail_doc_noarg() { $luarocks doc; } fail_new_version_noarg() { $luarocks new_version; } @@ -432,6 +433,8 @@ test_unpack_rockspec() { rm -rf ./cprint-${verrev_cprint} && $luarocks download test_unpack_binary() { rm -rf ./cprint-${verrev_cprint} && $luarocks build cprint && $luarocks pack cprint && $luarocks unpack ./cprint-${verrev_cprint}.${platform}.rock && rm -rf ./cprint-${verrev_cprint}; } fail_unpack_invalidpatch() { need_luasocket; $luarocks unpack "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; } +fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; } + test_admin_help() { $luarocks_admin help; } test_admin_make_manifest() { $luarocks_admin make_manifest; } @@ -532,7 +535,10 @@ if [ "$travis" ] then build_environment luacov luafilesystem luacov-coveralls echo "( cd $testing_dir && $testing_sys_tree/bin/luacov-coveralls || echo ok )" - ( cd $testing_dir; $testing_sys_tree/bin/luacov-coveralls || echo "ok" ) + if [ "$TRAVIS" ] + then + ( cd $testing_dir; $testing_sys_tree/bin/luacov-coveralls || echo "ok" ) + fi $testing_sys_tree/bin/luacov -c $testing_dir/luacov.config src/luarocks src/bin grep "Summary" -B1 -A1000 $testing_dir/luacov.report.out else -- cgit v1.2.3-55-g6feb