aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMihai Branescu <branescu.mihai@gmail.com>2016-04-10 17:01:54 +0300
committerMihai Branescu <branescu.mihai@gmail.com>2016-04-10 17:01:54 +0300
commit46721bbeb6e91411b406b948c60fe25f3213d4de (patch)
tree9b9488af1d8ac23e7f688cf351e43927fd84775b /test
parented22f45b6837e1b2b9375e81c03e223cd5127e23 (diff)
downloadluarocks-46721bbeb6e91411b406b948c60fe25f3213d4de.tar.gz
luarocks-46721bbeb6e91411b406b948c60fe25f3213d4de.tar.bz2
luarocks-46721bbeb6e91411b406b948c60fe25f3213d4de.zip
A number of tests for the luaRocks test suite.
Diffstat (limited to 'test')
-rwxr-xr-xtest/testing.sh10
1 files changed, 9 insertions, 1 deletions
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() {
329need_luasocket() { need luasocket $verrev_luasocket; } 329need_luasocket() { need luasocket $verrev_luasocket; }
330 330
331# Tests ######################################### 331# Tests #########################################
332
333test_version() { $luarocks --version; } 332test_version() { $luarocks --version; }
334 333
335fail_unknown_command() { $luarocks unknown_command; } 334fail_unknown_command() { $luarocks unknown_command; }
@@ -410,6 +409,7 @@ test_download_rockspecversion() { $luarocks download --rockspec validate-args ${
410test_help() { $luarocks help; } 409test_help() { $luarocks help; }
411fail_help_invalid() { $luarocks help invalid; } 410fail_help_invalid() { $luarocks help invalid; }
412 411
412test_install_only_deps() { $luarocks install --only-deps "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; }
413test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; } 413test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; }
414test_install_with_bin() { $luarocks install wsapi; } 414test_install_with_bin() { $luarocks install wsapi; }
415fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; } 415fail_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; }
451test_path_lr_bin() { $luarocks path --lr-bin; } 451test_path_lr_bin() { $luarocks path --lr-bin; }
452 452
453fail_purge_missing_tree() { $luarocks purge --tree="$testing_tree"; } 453fail_purge_missing_tree() { $luarocks purge --tree="$testing_tree"; }
454fail_purge_tree_notstring() { $luarocks purge --tree=1; }
454test_purge() { $luarocks purge --tree="$testing_sys_tree"; } 455test_purge() { $luarocks purge --tree="$testing_sys_tree"; }
456test_purge_oldversions() { $luarocks purge --old-versions --tree="$testing_sys_tree"; }
455 457
456test_remove() { $luarocks build abelhas ${version_abelhas} && $luarocks remove abelhas ${version_abelhas}; } 458test_remove() { $luarocks build abelhas ${version_abelhas} && $luarocks remove abelhas ${version_abelhas}; }
457test_remove_force() { need_luasocket; $luarocks build lualogging && $luarocks remove --force luasocket; } 459test_remove_force() { need_luasocket; $luarocks build lualogging && $luarocks remove --force luasocket; }
@@ -485,6 +487,9 @@ fail_unpack_invalidrockspec() { need_luasocket; $luarocks unpack "invalid.rocksp
485 487
486fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; } 488fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; }
487fail_upload_invalidkey() { $luarocks upload --api-key="invalid" "invalid.rockspec"; } 489fail_upload_invalidkey() { $luarocks upload --api-key="invalid" "invalid.rockspec"; }
490fail_upload_skippack() { $luarocks upload --api-key="invalid" --skip-pack "luacov-${verrev_luacov}.rockspec"; }
491fail_upload_force() { $luarocks install lua-cjson && $luarocks upload --api-key="invalid" --force "luacov-${verrev_luacov}.rockspec" && $luarocks remove lua-cjson; }
492
488 493
489test_admin_help() { $luarocks_admin help; } 494test_admin_help() { $luarocks_admin help; }
490 495
@@ -547,6 +552,9 @@ EOF
547test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } 552test_doc() { $luarocks install luarepl; $luarocks doc luarepl; }
548test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; } 553test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; }
549fail_doc_invalid() { $luarocks doc invalid; } 554fail_doc_invalid() { $luarocks doc invalid; }
555test_doc_list() { $luarocks install luacov; $luarocks doc luacov --list; }
556test_doc_local() { $luarocks install luacov; $luarocks doc luacov --local; }
557test_doc_porcelain() { $luarocks install luacov; $luarocks doc luacov --porcelain; }
550 558
551# Driver ######################################### 559# Driver #########################################
552 560