diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2016-04-18 16:19:09 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2016-04-18 16:19:09 -0300 |
| commit | 09da2f695b3e531e8bc88082e9f06f3875685cab (patch) | |
| tree | 133f34473a5d17e48a9bb089d636f7cbeab3f933 | |
| parent | 362144e169d30e3d95e4bab2f55a4f20d93a8859 (diff) | |
| parent | 46721bbeb6e91411b406b948c60fe25f3213d4de (diff) | |
| download | luarocks-09da2f695b3e531e8bc88082e9f06f3875685cab.tar.gz luarocks-09da2f695b3e531e8bc88082e9f06f3875685cab.tar.bz2 luarocks-09da2f695b3e531e8bc88082e9f06f3875685cab.zip | |
Merge pull request #541 from BranescuMihai/master
New tests for the luaRocks test suite.
| -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 f3b917c0..95b3243c 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 | ||
