aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-05-03 16:39:17 -0300
committerHisham <hisham@gobolinux.org>2016-05-03 16:39:17 -0300
commitab8c6c7926afe5ca2fcfc330de18618d9dce1059 (patch)
tree6dd0614afc3ade5b60b865082586103fe2dff104 /test
parentd96e375eb6b2356a9e7d1d172ac2043b362a41ee (diff)
parente281fea83c49e301ff7bfb4af444e68d02309f5f (diff)
downloadluarocks-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.lua1
-rwxr-xr-xtest/testing.sh13
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
213version_cprint=0.1 213version_cprint=0.1
214verrev_cprint=0.1-2 214verrev_cprint=0.1-2
215 215
216version_luacov=0.9.1 216version_luacov=0.11.0
217verrev_luacov=${version_luacov}-1 217verrev_luacov=${version_luacov}-1
218version_lxsh=0.8.6 218version_lxsh=0.8.6
219version_validate_args=1.5.4 219version_validate_args=1.5.4
@@ -364,7 +364,6 @@ need() {
364need_luasocket() { need luasocket $verrev_luasocket; } 364need_luasocket() { need luasocket $verrev_luasocket; }
365 365
366# Tests ######################################### 366# Tests #########################################
367
368test_version() { $luarocks --version; } 367test_version() { $luarocks --version; }
369 368
370fail_unknown_command() { $luarocks unknown_command; } 369fail_unknown_command() { $luarocks unknown_command; }
@@ -445,6 +444,7 @@ test_download_rockspecversion() { $luarocks download --rockspec validate-args ${
445test_help() { $luarocks help; } 444test_help() { $luarocks help; }
446fail_help_invalid() { $luarocks help invalid; } 445fail_help_invalid() { $luarocks help invalid; }
447 446
447test_install_only_deps() { $luarocks install --only-deps "$testing_cache/luasocket-$verrev_luasocket.$platform.rock"; }
448test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; } 448test_install_binaryrock() { $luarocks build --pack-binary-rock cprint && $luarocks install ./cprint-${verrev_cprint}.${platform}.rock && rm ./cprint-${verrev_cprint}.${platform}.rock; }
449test_install_with_bin() { $luarocks install wsapi; } 449test_install_with_bin() { $luarocks install wsapi; }
450fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; } 450fail_install_notazipfile() { $luarocks install "$testing_dir/testfiles/not_a_zipfile-1.0-1.src.rock"; }
@@ -484,9 +484,12 @@ test_path() { $luarocks path --bin; }
484test_path_lr_path() { $luarocks path --lr-path; } 484test_path_lr_path() { $luarocks path --lr-path; }
485test_path_lr_cpath() { $luarocks path --lr-cpath; } 485test_path_lr_cpath() { $luarocks path --lr-cpath; }
486test_path_lr_bin() { $luarocks path --lr-bin; } 486test_path_lr_bin() { $luarocks path --lr-bin; }
487test_path_with_tree() { $luarocks path --tree=lua_modules; }
487 488
488fail_purge_missing_tree() { $luarocks purge --tree="$testing_tree"; } 489fail_purge_missing_tree() { $luarocks purge --tree="$testing_tree"; }
490fail_purge_tree_notstring() { $luarocks purge --tree=1; }
489test_purge() { $luarocks purge --tree="$testing_sys_tree"; } 491test_purge() { $luarocks purge --tree="$testing_sys_tree"; }
492test_purge_oldversions() { $luarocks purge --old-versions --tree="$testing_sys_tree"; }
490 493
491test_remove() { $luarocks build abelhas ${version_abelhas} && $luarocks remove abelhas ${version_abelhas}; } 494test_remove() { $luarocks build abelhas ${version_abelhas} && $luarocks remove abelhas ${version_abelhas}; }
492test_remove_force() { need_luasocket; $luarocks build lualogging && $luarocks remove --force luasocket; } 495test_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
521fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; } 524fail_upload_invalidrockspec() { $luarocks upload "invalid.rockspec"; }
522fail_upload_invalidkey() { $luarocks upload --api-key="invalid" "invalid.rockspec"; } 525fail_upload_invalidkey() { $luarocks upload --api-key="invalid" "invalid.rockspec"; }
526fail_upload_skippack() { $luarocks upload --api-key="invalid" --skip-pack "luacov-${verrev_luacov}.rockspec"; }
527fail_upload_force() { $luarocks install lua-cjson && $luarocks upload --api-key="invalid" --force "luacov-${verrev_luacov}.rockspec" && $luarocks remove lua-cjson; }
528
523 529
524test_admin_help() { $luarocks_admin help; } 530test_admin_help() { $luarocks_admin help; }
525 531
@@ -595,6 +601,9 @@ fail_luajit_dependency() {
595test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } 601test_doc() { $luarocks install luarepl; $luarocks doc luarepl; }
596test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; } 602test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; }
597fail_doc_invalid() { $luarocks doc invalid; } 603fail_doc_invalid() { $luarocks doc invalid; }
604test_doc_list() { $luarocks install luacov; $luarocks doc luacov --list; }
605test_doc_local() { $luarocks install luacov; $luarocks doc luacov --local; }
606test_doc_porcelain() { $luarocks install luacov; $luarocks doc luacov --porcelain; }
598 607
599# Driver ######################################### 608# Driver #########################################
600 609