diff options
| author | Hisham <hisham@gobolinux.org> | 2016-05-03 16:39:17 -0300 |
|---|---|---|
| committer | Hisham <hisham@gobolinux.org> | 2016-05-03 16:39:17 -0300 |
| commit | ab8c6c7926afe5ca2fcfc330de18618d9dce1059 (patch) | |
| tree | 6dd0614afc3ade5b60b865082586103fe2dff104 /test | |
| parent | d96e375eb6b2356a9e7d1d172ac2043b362a41ee (diff) | |
| parent | e281fea83c49e301ff7bfb4af444e68d02309f5f (diff) | |
| download | luarocks-ab8c6c7926afe5ca2fcfc330de18618d9dce1059.tar.gz luarocks-ab8c6c7926afe5ca2fcfc330de18618d9dce1059.tar.bz2 luarocks-ab8c6c7926afe5ca2fcfc330de18618d9dce1059.zip | |
Merge branch 'master' into luarocks-3
Diffstat (limited to 'test')
| -rw-r--r-- | test/testing.lua | 1 | ||||
| -rwxr-xr-x | test/testing.sh | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/test/testing.lua b/test/testing.lua index 6d4b4b05..c37293ee 100644 --- a/test/testing.lua +++ b/test/testing.lua | |||
| @@ -266,6 +266,7 @@ local tests = { | |||
| 266 | test_path_lr_path = function() return run "$luarocks path --lr-path" end, | 266 | test_path_lr_path = function() return run "$luarocks path --lr-path" end, |
| 267 | test_path_lr_cpath = function() return run "$luarocks path --lr-cpath" end, | 267 | test_path_lr_cpath = function() return run "$luarocks path --lr-cpath" end, |
| 268 | test_path_lr_bin = function() return run "$luarocks path --lr-bin" end, | 268 | test_path_lr_bin = function() return run "$luarocks path --lr-bin" end, |
| 269 | test_path_with_tree = function() return run "$luarocks path --tree=lua_modules" end, | ||
| 269 | fail_purge_missing_tree = function() return run '$luarocks purge --tree="$testing_tree"' end, | 270 | fail_purge_missing_tree = function() return run '$luarocks purge --tree="$testing_tree"' end, |
| 270 | test_purge = function() return run '$luarocks purge --tree="$testing_sys_tree"' end, | 271 | test_purge = function() return run '$luarocks purge --tree="$testing_sys_tree"' end, |
| 271 | test_remove = function() | 272 | test_remove = function() |
diff --git a/test/testing.sh b/test/testing.sh index 92c6ab5d..dbc1249e 100755 --- a/test/testing.sh +++ b/test/testing.sh | |||
| @@ -213,7 +213,7 @@ srcdir_luasocket=luasocket-3.0-rc1 | |||
| 213 | version_cprint=0.1 | 213 | version_cprint=0.1 |
| 214 | verrev_cprint=0.1-2 | 214 | verrev_cprint=0.1-2 |
| 215 | 215 | ||
| 216 | version_luacov=0.9.1 | 216 | version_luacov=0.11.0 |
| 217 | verrev_luacov=${version_luacov}-1 | 217 | verrev_luacov=${version_luacov}-1 |
| 218 | version_lxsh=0.8.6 | 218 | version_lxsh=0.8.6 |
| 219 | version_validate_args=1.5.4 | 219 | version_validate_args=1.5.4 |
| @@ -364,7 +364,6 @@ need() { | |||
| 364 | need_luasocket() { need luasocket $verrev_luasocket; } | 364 | need_luasocket() { need luasocket $verrev_luasocket; } |
| 365 | 365 | ||
| 366 | # Tests ######################################### | 366 | # Tests ######################################### |
| 367 | |||
| 368 | test_version() { $luarocks --version; } | 367 | test_version() { $luarocks --version; } |
| 369 | 368 | ||
| 370 | fail_unknown_command() { $luarocks unknown_command; } | 369 | fail_unknown_command() { $luarocks unknown_command; } |
| @@ -445,6 +444,7 @@ test_download_rockspecversion() { $luarocks download --rockspec validate-args ${ | |||
| 445 | test_help() { $luarocks help; } | 444 | test_help() { $luarocks help; } |
| 446 | fail_help_invalid() { $luarocks help invalid; } | 445 | fail_help_invalid() { $luarocks help invalid; } |
| 447 | 446 | ||
| 447 | test_install_only_deps() { $luarocks install --only-deps "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; } | ||
| 448 | test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; } | 448 | test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; } |
| 449 | test_install_with_bin() { $luarocks install wsapi; } | 449 | test_install_with_bin() { $luarocks install wsapi; } |
| 450 | fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; } | 450 | fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; } |
| @@ -484,9 +484,12 @@ test_path() { $luarocks path --bin; } | |||
| 484 | test_path_lr_path() { $luarocks path --lr-path; } | 484 | test_path_lr_path() { $luarocks path --lr-path; } |
| 485 | test_path_lr_cpath() { $luarocks path --lr-cpath; } | 485 | test_path_lr_cpath() { $luarocks path --lr-cpath; } |
| 486 | test_path_lr_bin() { $luarocks path --lr-bin; } | 486 | test_path_lr_bin() { $luarocks path --lr-bin; } |
| 487 | test_path_with_tree() { $luarocks path --tree=lua_modules; } | ||
| 487 | 488 | ||
| 488 | fail_purge_missing_tree() { $luarocks purge --tree="$testing_tree"; } | 489 | fail_purge_missing_tree() { $luarocks purge --tree="$testing_tree"; } |
| 490 | fail_purge_tree_notstring() { $luarocks purge --tree=1; } | ||
| 489 | test_purge() { $luarocks purge --tree="$testing_sys_tree"; } | 491 | test_purge() { $luarocks purge --tree="$testing_sys_tree"; } |
| 492 | test_purge_oldversions() { $luarocks purge --old-versions --tree="$testing_sys_tree"; } | ||
| 490 | 493 | ||
| 491 | test_remove() { $luarocks build abelhas ${version_abelhas} && $luarocks remove abelhas ${version_abelhas}; } | 494 | test_remove() { $luarocks build abelhas ${version_abelhas} && $luarocks remove abelhas ${version_abelhas}; } |
| 492 | test_remove_force() { need_luasocket; $luarocks build lualogging && $luarocks remove --force luasocket; } | 495 | test_remove_force() { need_luasocket; $luarocks build lualogging && $luarocks remove --force luasocket; } |
| @@ -520,6 +523,9 @@ fail_unpack_invalidrockspec() { need_luasocket; $luarocks unpack "invalid.rocksp | |||
| 520 | 523 | ||
| 521 | fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; } | 524 | fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; } |
| 522 | fail_upload_invalidkey() { $luarocks upload --api-key="invalid" "invalid.rockspec"; } | 525 | fail_upload_invalidkey() { $luarocks upload --api-key="invalid" "invalid.rockspec"; } |
| 526 | fail_upload_skippack() { $luarocks upload --api-key="invalid" --skip-pack "luacov-${verrev_luacov}.rockspec"; } | ||
| 527 | fail_upload_force() { $luarocks install lua-cjson && $luarocks upload --api-key="invalid" --force "luacov-${verrev_luacov}.rockspec" && $luarocks remove lua-cjson; } | ||
| 528 | |||
| 523 | 529 | ||
| 524 | test_admin_help() { $luarocks_admin help; } | 530 | test_admin_help() { $luarocks_admin help; } |
| 525 | 531 | ||
| @@ -595,6 +601,9 @@ fail_luajit_dependency() { | |||
| 595 | test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } | 601 | test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } |
| 596 | test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; } | 602 | test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; } |
| 597 | fail_doc_invalid() { $luarocks doc invalid; } | 603 | fail_doc_invalid() { $luarocks doc invalid; } |
| 604 | test_doc_list() { $luarocks install luacov; $luarocks doc luacov --list; } | ||
| 605 | test_doc_local() { $luarocks install luacov; $luarocks doc luacov --local; } | ||
| 606 | test_doc_porcelain() { $luarocks install luacov; $luarocks doc luacov --porcelain; } | ||
| 598 | 607 | ||
| 599 | # Driver ######################################### | 608 | # Driver ######################################### |
| 600 | 609 | ||
