aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCameron Moy <camoy@umd.edu>2016-03-22 13:16:35 -0400
committerCameron Moy <camoy@umd.edu>2016-03-22 13:16:35 -0400
commit2de085d29722953932ac6593ad594969f528c84c (patch)
tree2eca258ced015843da23a5397149ab48cb13958d /test
parentd715fe5545bd639b2f4c97dc22a7a33b060b48d0 (diff)
downloadluarocks-2de085d29722953932ac6593ad594969f528c84c.tar.gz
luarocks-2de085d29722953932ac6593ad594969f528c84c.tar.bz2
luarocks-2de085d29722953932ac6593ad594969f528c84c.zip
Add tests for more flags
Diffstat (limited to 'test')
-rwxr-xr-xtest/testing.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/testing.sh b/test/testing.sh
index 5965ac8f..106f31cd 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -340,6 +340,8 @@ fail_arg_string_no_parameter() { $luarocks --server; }
340fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; } 340fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; }
341fail_arg_string_unknown() { $luarocks --invalid-flag=abc; } 341fail_arg_string_unknown() { $luarocks --invalid-flag=abc; }
342 342
343fail_invalid_assignment() { $luarocks invalid=5; }
344
343test_empty_list() { $luarocks list; } 345test_empty_list() { $luarocks list; }
344test_list_outdated() { $luarocks list --outdated; } 346test_list_outdated() { $luarocks list --outdated; }
345 347
@@ -394,6 +396,8 @@ test_build_only_deps_rockspec() { $luarocks download --rockspec lxsh ${verrev_lx
394test_build_only_deps_src_rock() { $luarocks download --source lxsh ${verrev_lxsh} && $luarocks build ./lxsh-${verrev_lxsh}.src.rock --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; } 396test_build_only_deps_src_rock() { $luarocks download --source lxsh ${verrev_lxsh} && $luarocks build ./lxsh-${verrev_lxsh}.src.rock --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; }
395test_build_only_deps() { $luarocks build luasec --only-deps && { $luarocks show luasec; [ $? -ne 0 ]; }; } 397test_build_only_deps() { $luarocks build luasec --only-deps && { $luarocks show luasec; [ $? -ne 0 ]; }; }
396test_install_only_deps() { $luarocks install lxsh ${verrev_lxsh} --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; } 398test_install_only_deps() { $luarocks install lxsh ${verrev_lxsh} --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; }
399test_build_no_deps() { $luarocks build luasec --nodeps; }
400test_install_no_deps() { $luarocks install luasec --nodeps; }
397fail_build_missing_external() { $luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"; } 401fail_build_missing_external() { $luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"; }
398fail_build_invalidpatch() { need_luasocket; $luarocks build "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; } 402fail_build_invalidpatch() { need_luasocket; $luarocks build "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; }
399 403
@@ -464,6 +468,11 @@ fail_search_nostring() { $var=123; $luarocks search $var; }
464test_show() { $luarocks show luacov; } 468test_show() { $luarocks show luacov; }
465test_show_modules() { $luarocks show --modules luacov; } 469test_show_modules() { $luarocks show --modules luacov; }
466test_show_home() { $luarocks show --home luacov; } 470test_show_home() { $luarocks show --home luacov; }
471test_show_deps() { $luarocks show --deps luacov; }
472test_show_rockspec() { $luarocks show --rockspec luacov; }
473test_show_mversion() { $luarocks show --mversion luacov; }
474test_show_rocktree() { $luarocks show --rock-tree luacov; }
475test_show_rockdir() { $luarocks show --rock-dir luacov; }
467test_show_depends() { need_luasocket; $luarocks install $luasec && $luarocks show luasec; } 476test_show_depends() { need_luasocket; $luarocks install $luasec && $luarocks show luasec; }
468test_show_oldversion() { $luarocks install luacov ${version_luacov} && $luarocks show luacov ${version_luacov}; } 477test_show_oldversion() { $luarocks install luacov ${version_luacov} && $luarocks show luacov ${version_luacov}; }
469 478
@@ -501,6 +510,7 @@ test_deps_mode_make_order() { $luarocks build --tree="$testing_sys_tree" lpeg &&
501test_deps_mode_make_order_sys() { $luarocks build --tree="$testing_tree" lpeg && rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --source lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make --tree="$testing_sys_tree" --deps-mode=order && cd ../.. && [ `$luarocks_noecho list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ] && rm -rf ./lxsh-${verrev_lxsh}; } 510test_deps_mode_make_order_sys() { $luarocks build --tree="$testing_tree" lpeg && rm -rf ./lxsh-${verrev_lxsh} && $luarocks download --source lxsh ${verrev_lxsh} && $luarocks unpack ./lxsh-${verrev_lxsh}.src.rock && cd lxsh-${verrev_lxsh}/lxsh-${version_lxsh}-1 && $luarocks make --tree="$testing_sys_tree" --deps-mode=order && cd ../.. && [ `$luarocks_noecho list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ] && rm -rf ./lxsh-${verrev_lxsh}; }
502 511
503test_write_rockspec() { $luarocks write_rockspec git://github.com/keplerproject/luarocks; } 512test_write_rockspec() { $luarocks write_rockspec git://github.com/keplerproject/luarocks; }
513test_write_rockspec_tag() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --tag=v2.3.0; }
504test_write_rockspec_lib() { $luarocks write_rockspec git://github.com/mbalmer/luafcgi --lib=fcgi --license="3-clause BSD" --lua-version=5.1,5.2; } 514test_write_rockspec_lib() { $luarocks write_rockspec git://github.com/mbalmer/luafcgi --lib=fcgi --license="3-clause BSD" --lua-version=5.1,5.2; }
505test_write_rockspec_format() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --rockspec-format=1.1 --lua-version=5.1,5.2; } 515test_write_rockspec_format() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --rockspec-format=1.1 --lua-version=5.1,5.2; }
506test_write_rockspec_fullargs() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --lua-version=5.1,5.2 --license="MIT/X11" --homepage="http://www.luarocks.org" --summary="A package manager for Lua modules"; } 516test_write_rockspec_fullargs() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --lua-version=5.1,5.2 --license="MIT/X11" --homepage="http://www.luarocks.org" --summary="A package manager for Lua modules"; }