diff options
author | Mihai Branescu <branescu.mihai@gmail.com> | 2016-04-10 17:01:54 +0300 |
---|---|---|
committer | Mihai Branescu <branescu.mihai@gmail.com> | 2016-04-10 17:01:54 +0300 |
commit | 46721bbeb6e91411b406b948c60fe25f3213d4de (patch) | |
tree | 9b9488af1d8ac23e7f688cf351e43927fd84775b /test | |
parent | ed22f45b6837e1b2b9375e81c03e223cd5127e23 (diff) | |
download | luarocks-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-x | test/testing.sh | 10 |
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() { | |||
329 | need_luasocket() { need luasocket $verrev_luasocket; } | 329 | need_luasocket() { need luasocket $verrev_luasocket; } |
330 | 330 | ||
331 | # Tests ######################################### | 331 | # Tests ######################################### |
332 | |||
333 | test_version() { $luarocks --version; } | 332 | test_version() { $luarocks --version; } |
334 | 333 | ||
335 | fail_unknown_command() { $luarocks unknown_command; } | 334 | fail_unknown_command() { $luarocks unknown_command; } |
@@ -410,6 +409,7 @@ test_download_rockspecversion() { $luarocks download --rockspec validate-args ${ | |||
410 | test_help() { $luarocks help; } | 409 | test_help() { $luarocks help; } |
411 | fail_help_invalid() { $luarocks help invalid; } | 410 | fail_help_invalid() { $luarocks help invalid; } |
412 | 411 | ||
412 | test_install_only_deps() { $luarocks install --only-deps "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; } | ||
413 | test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; } | 413 | test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; } |
414 | test_install_with_bin() { $luarocks install wsapi; } | 414 | test_install_with_bin() { $luarocks install wsapi; } |
415 | fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; } | 415 | 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; } | |||
451 | test_path_lr_bin() { $luarocks path --lr-bin; } | 451 | test_path_lr_bin() { $luarocks path --lr-bin; } |
452 | 452 | ||
453 | fail_purge_missing_tree() { $luarocks purge --tree="$testing_tree"; } | 453 | fail_purge_missing_tree() { $luarocks purge --tree="$testing_tree"; } |
454 | fail_purge_tree_notstring() { $luarocks purge --tree=1; } | ||
454 | test_purge() { $luarocks purge --tree="$testing_sys_tree"; } | 455 | test_purge() { $luarocks purge --tree="$testing_sys_tree"; } |
456 | test_purge_oldversions() { $luarocks purge --old-versions --tree="$testing_sys_tree"; } | ||
455 | 457 | ||
456 | test_remove() { $luarocks build abelhas ${version_abelhas} && $luarocks remove abelhas ${version_abelhas}; } | 458 | test_remove() { $luarocks build abelhas ${version_abelhas} && $luarocks remove abelhas ${version_abelhas}; } |
457 | test_remove_force() { need_luasocket; $luarocks build lualogging && $luarocks remove --force luasocket; } | 459 | 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 | |||
485 | 487 | ||
486 | fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; } | 488 | fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; } |
487 | fail_upload_invalidkey() { $luarocks upload --api-key="invalid" "invalid.rockspec"; } | 489 | fail_upload_invalidkey() { $luarocks upload --api-key="invalid" "invalid.rockspec"; } |
490 | fail_upload_skippack() { $luarocks upload --api-key="invalid" --skip-pack "luacov-${verrev_luacov}.rockspec"; } | ||
491 | fail_upload_force() { $luarocks install lua-cjson && $luarocks upload --api-key="invalid" --force "luacov-${verrev_luacov}.rockspec" && $luarocks remove lua-cjson; } | ||
492 | |||
488 | 493 | ||
489 | test_admin_help() { $luarocks_admin help; } | 494 | test_admin_help() { $luarocks_admin help; } |
490 | 495 | ||
@@ -547,6 +552,9 @@ EOF | |||
547 | test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } | 552 | test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } |
548 | test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; } | 553 | test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; } |
549 | fail_doc_invalid() { $luarocks doc invalid; } | 554 | fail_doc_invalid() { $luarocks doc invalid; } |
555 | test_doc_list() { $luarocks install luacov; $luarocks doc luacov --list; } | ||
556 | test_doc_local() { $luarocks install luacov; $luarocks doc luacov --local; } | ||
557 | test_doc_porcelain() { $luarocks install luacov; $luarocks doc luacov --porcelain; } | ||
550 | 558 | ||
551 | # Driver ######################################### | 559 | # Driver ######################################### |
552 | 560 | ||