diff options
author | Cameron Moy <camoy@umd.edu> | 2016-03-22 13:16:35 -0400 |
---|---|---|
committer | Cameron Moy <camoy@umd.edu> | 2016-03-22 13:16:35 -0400 |
commit | 2de085d29722953932ac6593ad594969f528c84c (patch) | |
tree | 2eca258ced015843da23a5397149ab48cb13958d /test | |
parent | d715fe5545bd639b2f4c97dc22a7a33b060b48d0 (diff) | |
download | luarocks-2de085d29722953932ac6593ad594969f528c84c.tar.gz luarocks-2de085d29722953932ac6593ad594969f528c84c.tar.bz2 luarocks-2de085d29722953932ac6593ad594969f528c84c.zip |
Add tests for more flags
Diffstat (limited to 'test')
-rwxr-xr-x | test/testing.sh | 10 |
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; } | |||
340 | fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; } | 340 | fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; } |
341 | fail_arg_string_unknown() { $luarocks --invalid-flag=abc; } | 341 | fail_arg_string_unknown() { $luarocks --invalid-flag=abc; } |
342 | 342 | ||
343 | fail_invalid_assignment() { $luarocks invalid=5; } | ||
344 | |||
343 | test_empty_list() { $luarocks list; } | 345 | test_empty_list() { $luarocks list; } |
344 | test_list_outdated() { $luarocks list --outdated; } | 346 | test_list_outdated() { $luarocks list --outdated; } |
345 | 347 | ||
@@ -394,6 +396,8 @@ test_build_only_deps_rockspec() { $luarocks download --rockspec lxsh ${verrev_lx | |||
394 | test_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 ]; }; } | 396 | test_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 ]; }; } |
395 | test_build_only_deps() { $luarocks build luasec --only-deps && { $luarocks show luasec; [ $? -ne 0 ]; }; } | 397 | test_build_only_deps() { $luarocks build luasec --only-deps && { $luarocks show luasec; [ $? -ne 0 ]; }; } |
396 | test_install_only_deps() { $luarocks install lxsh ${verrev_lxsh} --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; } | 398 | test_install_only_deps() { $luarocks install lxsh ${verrev_lxsh} --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; } |
399 | test_build_no_deps() { $luarocks build luasec --nodeps; } | ||
400 | test_install_no_deps() { $luarocks install luasec --nodeps; } | ||
397 | fail_build_missing_external() { $luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"; } | 401 | fail_build_missing_external() { $luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"; } |
398 | fail_build_invalidpatch() { need_luasocket; $luarocks build "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; } | 402 | fail_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; } | |||
464 | test_show() { $luarocks show luacov; } | 468 | test_show() { $luarocks show luacov; } |
465 | test_show_modules() { $luarocks show --modules luacov; } | 469 | test_show_modules() { $luarocks show --modules luacov; } |
466 | test_show_home() { $luarocks show --home luacov; } | 470 | test_show_home() { $luarocks show --home luacov; } |
471 | test_show_deps() { $luarocks show --deps luacov; } | ||
472 | test_show_rockspec() { $luarocks show --rockspec luacov; } | ||
473 | test_show_mversion() { $luarocks show --mversion luacov; } | ||
474 | test_show_rocktree() { $luarocks show --rock-tree luacov; } | ||
475 | test_show_rockdir() { $luarocks show --rock-dir luacov; } | ||
467 | test_show_depends() { need_luasocket; $luarocks install $luasec && $luarocks show luasec; } | 476 | test_show_depends() { need_luasocket; $luarocks install $luasec && $luarocks show luasec; } |
468 | test_show_oldversion() { $luarocks install luacov ${version_luacov} && $luarocks show luacov ${version_luacov}; } | 477 | test_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 && | |||
501 | test_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}; } | 510 | test_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 | ||
503 | test_write_rockspec() { $luarocks write_rockspec git://github.com/keplerproject/luarocks; } | 512 | test_write_rockspec() { $luarocks write_rockspec git://github.com/keplerproject/luarocks; } |
513 | test_write_rockspec_tag() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --tag=v2.3.0; } | ||
504 | test_write_rockspec_lib() { $luarocks write_rockspec git://github.com/mbalmer/luafcgi --lib=fcgi --license="3-clause BSD" --lua-version=5.1,5.2; } | 514 | test_write_rockspec_lib() { $luarocks write_rockspec git://github.com/mbalmer/luafcgi --lib=fcgi --license="3-clause BSD" --lua-version=5.1,5.2; } |
505 | test_write_rockspec_format() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --rockspec-format=1.1 --lua-version=5.1,5.2; } | 515 | test_write_rockspec_format() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --rockspec-format=1.1 --lua-version=5.1,5.2; } |
506 | test_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"; } | 516 | test_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"; } |