diff options
author | mpeterv <mpeterval@gmail.com> | 2016-04-16 11:39:18 +0300 |
---|---|---|
committer | mpeterv <mpeterval@gmail.com> | 2016-04-16 11:39:18 +0300 |
commit | 53788ea4054cc619d610bf19d948e1a16325b89c (patch) | |
tree | 6ed0c12f4110075ee8bbc202e5c82b60892b5b09 /test | |
parent | 3856404d5f38addd2d20d930bc0a64d1ecc2a5d5 (diff) | |
parent | 3576869364203e2325a03960dd2c0d618355cb63 (diff) | |
download | luarocks-53788ea4054cc619d610bf19d948e1a16325b89c.tar.gz luarocks-53788ea4054cc619d610bf19d948e1a16325b89c.tar.bz2 luarocks-53788ea4054cc619d610bf19d948e1a16325b89c.zip |
Merge branch 'master' into luarocks-3
Conflicts:
src/luarocks/deps.lua
Diffstat (limited to 'test')
-rw-r--r-- | test/testing.bat | 2 | ||||
-rw-r--r-- | test/testing.lua | 6 | ||||
-rwxr-xr-x | test/testing.sh | 67 |
3 files changed, 52 insertions, 23 deletions
diff --git a/test/testing.bat b/test/testing.bat index 319e12c3..7083678b 100644 --- a/test/testing.bat +++ b/test/testing.bat | |||
@@ -1,7 +1,7 @@ | |||
1 | @echo off | 1 | @echo off |
2 | Setlocal EnableDelayedExpansion EnableExtensions | 2 | Setlocal EnableDelayedExpansion EnableExtensions |
3 | 3 | ||
4 | if not defined LUAROCKS_REPO set LUAROCKS_REPO=http://rocks.moonscript.org | 4 | if not defined LUAROCKS_REPO set LUAROCKS_REPO=https://luarocks.org |
5 | 5 | ||
6 | appveyor DownloadFile %LUAROCKS_REPO%/stdlib-41.0.0-1.src.rock | 6 | appveyor DownloadFile %LUAROCKS_REPO%/stdlib-41.0.0-1.src.rock |
7 | luarocks build stdlib | 7 | luarocks build stdlib |
diff --git a/test/testing.lua b/test/testing.lua index 63dead2b..6d4b4b05 100644 --- a/test/testing.lua +++ b/test/testing.lua | |||
@@ -86,6 +86,7 @@ local tests = { | |||
86 | fail_arg_string_followed_by_flag = function() return run "$luarocks --server --porcelain" end, | 86 | fail_arg_string_followed_by_flag = function() return run "$luarocks --server --porcelain" end, |
87 | fail_arg_string_unknown = function() return run "$luarocks --invalid-flag=abc" end, | 87 | fail_arg_string_unknown = function() return run "$luarocks --invalid-flag=abc" end, |
88 | test_empty_list = function() return run "$luarocks list" end, | 88 | test_empty_list = function() return run "$luarocks list" end, |
89 | test_list_outdated = function () return run "$luarocks list --outdated" end, | ||
89 | fail_sysconfig_err = function() | 90 | fail_sysconfig_err = function() |
90 | mkdir "$testing_lrprefix/etc/luarocks" | 91 | mkdir "$testing_lrprefix/etc/luarocks" |
91 | file_set_contents("$testing_lrprefix/etc/luarocks/config.lua", "aoeui") | 92 | file_set_contents("$testing_lrprefix/etc/luarocks/config.lua", "aoeui") |
@@ -441,6 +442,11 @@ local tests = { | |||
441 | return run "$luarocks install luarepl" | 442 | return run "$luarocks install luarepl" |
442 | and run "$luarocks doc luarepl" | 443 | and run "$luarocks doc luarepl" |
443 | end, | 444 | end, |
445 | test_doc_home = function() | ||
446 | return run "$luarocks install luacov" | ||
447 | and run "$luarocks doc luacov --home" | ||
448 | end, | ||
449 | fail_doc_invalid = function () return run "$luarocks doc invalid" end, | ||
444 | 450 | ||
445 | -- Tests for https://github.com/keplerproject/luarocks/issues/375 | 451 | -- Tests for https://github.com/keplerproject/luarocks/issues/375 |
446 | test_fetch_base_dir = function() | 452 | test_fetch_base_dir = function() |
diff --git a/test/testing.sh b/test/testing.sh index a198c2f2..3a132a2b 100755 --- a/test/testing.sh +++ b/test/testing.sh | |||
@@ -127,20 +127,15 @@ upload_servers = { | |||
127 | EOF | 127 | EOF |
128 | cat <<EOF > $testing_dir/luacov.config | 128 | cat <<EOF > $testing_dir/luacov.config |
129 | return { | 129 | return { |
130 | ["configfile"] = ".luacov", | 130 | statsfile = "$testing_dir/luacov.stats.out", |
131 | ["statsfile"] = "$testing_dir/luacov.stats.out", | 131 | reportfile = "$testing_dir/luacov.report.out", |
132 | ["reportfile"] = "$testing_dir/luacov.report.out", | 132 | modules = { |
133 | runreport = false, | 133 | ["luarocks"] = "src/bin/luarocks", |
134 | deletestats = false, | 134 | ["luarocks-admin"] = "src/bin/luarocks-admin", |
135 | ["include"] = {}, | 135 | ["luarocks.*"] = "src", |
136 | ["exclude"] = { | 136 | ["luarocks.*.*"] = "src", |
137 | "luacov$", | 137 | ["luarocks.*.*.*"] = "src" |
138 | "luacov%.reporter$", | 138 | } |
139 | "luacov%.defaults$", | ||
140 | "luacov%.runner$", | ||
141 | "luacov%.stats$", | ||
142 | "luacov%.tick$", | ||
143 | }, | ||
144 | } | 139 | } |
145 | EOF | 140 | EOF |
146 | 141 | ||
@@ -218,7 +213,7 @@ srcdir_luasocket=luasocket-3.0-rc1 | |||
218 | version_cprint=0.1 | 213 | version_cprint=0.1 |
219 | verrev_cprint=0.1-2 | 214 | verrev_cprint=0.1-2 |
220 | 215 | ||
221 | version_luacov=0.8 | 216 | version_luacov=0.9.1 |
222 | verrev_luacov=${version_luacov}-1 | 217 | verrev_luacov=${version_luacov}-1 |
223 | version_lxsh=0.8.6 | 218 | version_lxsh=0.8.6 |
224 | version_validate_args=1.5.4 | 219 | version_validate_args=1.5.4 |
@@ -265,7 +260,7 @@ luajit_luarocks="luajit -e require('luacov.runner')('$testing_dir/luacov.config' | |||
265 | mkdir -p "$testing_server" | 260 | mkdir -p "$testing_server" |
266 | ( | 261 | ( |
267 | cd "$testing_server" | 262 | cd "$testing_server" |
268 | luarocks_repo="http://rocks.moonscript.org" | 263 | luarocks_repo="https://luarocks.org" |
269 | get() { [ -e `basename "$1"` ] || wget -c "$1"; } | 264 | get() { [ -e `basename "$1"` ] || wget -c "$1"; } |
270 | get "$luarocks_repo/luacov-${verrev_luacov}.src.rock" | 265 | get "$luarocks_repo/luacov-${verrev_luacov}.src.rock" |
271 | get "$luarocks_repo/luacov-${verrev_luacov}.rockspec" | 266 | get "$luarocks_repo/luacov-${verrev_luacov}.rockspec" |
@@ -380,7 +375,10 @@ fail_arg_string_no_parameter() { $luarocks --server; } | |||
380 | fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; } | 375 | fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; } |
381 | fail_arg_string_unknown() { $luarocks --invalid-flag=abc; } | 376 | fail_arg_string_unknown() { $luarocks --invalid-flag=abc; } |
382 | 377 | ||
378 | fail_invalid_assignment() { $luarocks invalid=5; } | ||
379 | |||
383 | test_empty_list() { $luarocks list; } | 380 | test_empty_list() { $luarocks list; } |
381 | test_list_outdated() { $luarocks list --outdated; } | ||
384 | 382 | ||
385 | fail_sysconfig_err() { local err=0; local scdir="$testing_lrprefix/etc/luarocks/"; mkdir -p "$scdir"; local sysconfig="$scdir/config.lua"; echo "aoeui" > "$sysconfig"; echo $sysconfig; $luarocks list; err=$?; rm "$sysconfig"; return "$err"; } | 383 | fail_sysconfig_err() { local err=0; local scdir="$testing_lrprefix/etc/luarocks/"; mkdir -p "$scdir"; local sysconfig="$scdir/config.lua"; echo "aoeui" > "$sysconfig"; echo $sysconfig; $luarocks list; err=$?; rm "$sysconfig"; return "$err"; } |
386 | fail_sysconfig_default_err() { local err=0; local scdir="$testing_lrprefix/etc/luarocks/"; mkdir -p "$scdir"; local sysconfig="$scdir/config-$luashortversion.lua"; echo "aoeui" > "$sysconfig"; echo $sysconfig; $luarocks list; err=$?; rm "$sysconfig"; return "$err"; } | 384 | fail_sysconfig_default_err() { local err=0; local scdir="$testing_lrprefix/etc/luarocks/"; mkdir -p "$scdir"; local sysconfig="$scdir/config-$luashortversion.lua"; echo "aoeui" > "$sysconfig"; echo $sysconfig; $luarocks list; err=$?; rm "$sysconfig"; return "$err"; } |
@@ -415,6 +413,12 @@ fail_build_permissions() { $luarocks build --tree=/usr lpeg; } | |||
415 | fail_build_permissions_parent() { $luarocks build --tree=/usr/invalid lpeg; } | 413 | fail_build_permissions_parent() { $luarocks build --tree=/usr/invalid lpeg; } |
416 | 414 | ||
417 | test_build_verbose() { $luarocks build --verbose lpeg; } | 415 | test_build_verbose() { $luarocks build --verbose lpeg; } |
416 | test_build_timeout() { $luarocks --timeout=10; } | ||
417 | fail_build_timeout_invalid() { $luarocks --timeout=abc; } | ||
418 | test_build_branch() { $luarocks build --branch=master lpeg; } | ||
419 | fail_build_invalid_entry_deps_mode() { $luarocks build --deps-mode=123 lpeg; } | ||
420 | test_build_only_server() { $luarocks --only-server=testing; } | ||
421 | test_build_only_sources() { $luarocks build --only-sources="http://example.com" lpeg; } | ||
418 | fail_build_blank_arg() { $luarocks build --tree="" lpeg; } | 422 | fail_build_blank_arg() { $luarocks build --tree="" lpeg; } |
419 | test_build_withpatch() { need_luasocket; $luarocks build luadoc; } | 423 | test_build_withpatch() { need_luasocket; $luarocks build luadoc; } |
420 | test_build_diffversion() { $luarocks build luacov ${version_luacov}; } | 424 | test_build_diffversion() { $luarocks build luacov ${version_luacov}; } |
@@ -427,6 +431,8 @@ test_build_only_deps_rockspec() { $luarocks download --rockspec lxsh ${verrev_lx | |||
427 | 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 ]; }; } | 431 | 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 ]; }; } |
428 | test_build_only_deps() { $luarocks build luasec --only-deps && { $luarocks show luasec; [ $? -ne 0 ]; }; } | 432 | test_build_only_deps() { $luarocks build luasec --only-deps && { $luarocks show luasec; [ $? -ne 0 ]; }; } |
429 | test_install_only_deps() { $luarocks install lxsh ${verrev_lxsh} --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; } | 433 | test_install_only_deps() { $luarocks install lxsh ${verrev_lxsh} --only-deps && { $luarocks show lxsh; [ $? -ne 0 ]; }; } |
434 | test_build_no_deps() { $luarocks build luasec --nodeps; } | ||
435 | test_install_no_deps() { $luarocks install luasec --nodeps; } | ||
430 | fail_build_missing_external() { $luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"; } | 436 | fail_build_missing_external() { $luarocks build "$testing_dir/testfiles/missing_external-0.1-1.rockspec" INEXISTENT_INCDIR="/invalid/dir"; } |
431 | fail_build_invalidpatch() { need_luasocket; $luarocks build "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; } | 437 | fail_build_invalidpatch() { need_luasocket; $luarocks build "$testing_dir/testfiles/invalid_patch-0.1-1.rockspec"; } |
432 | 438 | ||
@@ -461,12 +467,15 @@ test_list() { $luarocks list; } | |||
461 | test_list_porcelain() { $luarocks list --porcelain; } | 467 | test_list_porcelain() { $luarocks list --porcelain; } |
462 | 468 | ||
463 | test_make_with_rockspec() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --source luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.src.rock && cd luasocket-${verrev_luasocket}/${srcdir_luasocket} && $luarocks make luasocket-${verrev_luasocket}.rockspec && cd ../.. && rm -rf ./luasocket-${verrev_luasocket}; } | 469 | test_make_with_rockspec() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --source luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.src.rock && cd luasocket-${verrev_luasocket}/${srcdir_luasocket} && $luarocks make luasocket-${verrev_luasocket}.rockspec && cd ../.. && rm -rf ./luasocket-${verrev_luasocket}; } |
464 | test_make_default_rockspec() { 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 && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } | 470 | test_make_default_rockspec() { 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 new_version lxsh-${verrev_lxsh}.rockspec && $luarocks make && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } |
471 | test_make_unnamed_rockspec() { 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 && cp lxsh-${verrev_lxsh}.rockspec rockspec && $luarocks make && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } | ||
472 | fail_make_ambiguous_rockspec() { 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 && cp lxsh-${verrev_lxsh}.rockspec lxsh2-${verrev_lxsh}.rockspec && $luarocks make && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } | ||
473 | fail_make_ambiguous_unnamed_rockspec() { 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 && mv lxsh-${verrev_lxsh}.rockspec 1_rockspec && cp 1_rockspec 2_rockspec && $luarocks make && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } | ||
465 | test_make_pack_binary_rock() { 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 --deps-mode=none --pack-binary-rock && [ -e ./lxsh-${verrev_lxsh}.all.rock ] && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } | 474 | test_make_pack_binary_rock() { 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 --deps-mode=none --pack-binary-rock && [ -e ./lxsh-${verrev_lxsh}.all.rock ] && cd ../.. && rm -rf ./lxsh-${verrev_lxsh}; } |
466 | fail_make_which_rockspec() { rm -rf ./luasocket-${verrev_luasocket} && $luarocks download --source luasocket && $luarocks unpack ./luasocket-${verrev_luasocket}.src.rock && cd luasocket-${verrev_luasocket}/${srcdir_luasocket} && $luarocks make && cd ../.. && rm -rf ./luasocket-${verrev_luasocket}; } | ||
467 | 475 | ||
468 | test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; } | 476 | test_new_version() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec 0.2 && rm ./luacov-0.*; } |
469 | test_new_version_url() { $luarocks download --rockspec abelhas 1.0 && $luarocks new_version ./abelhas-1.0-1.rockspec 1.1 https://github.com/downloads/ittner/abelhas/abelhas-1.1.tar.gz && rm ./abelhas-*; } | 477 | test_new_version_url() { $luarocks download --rockspec abelhas 1.0 && $luarocks new_version ./abelhas-1.0-1.rockspec 1.1 https://github.com/downloads/ittner/abelhas/abelhas-1.1.tar.gz && rm ./abelhas-*; } |
478 | test_new_version_tag() { $luarocks download --rockspec luacov ${version_luacov} && $luarocks new_version ./luacov-${version_luacov}-1.rockspec --tag v0.3 && rm ./luacov-0.3-1.rockspec; } | ||
470 | 479 | ||
471 | test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; } | 480 | test_pack() { $luarocks list && $luarocks pack luacov && rm ./luacov-*.rock; } |
472 | test_pack_src() { $luarocks install $luasec && $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; } | 481 | test_pack_src() { $luarocks install $luasec && $luarocks download --rockspec luasocket && $luarocks pack ./luasocket-${verrev_luasocket}.rockspec && rm ./luasocket-${version_luasocket}-*.rock; } |
@@ -487,10 +496,18 @@ fail_remove_invalid_name() { $luarocks remove invalid.rock; } | |||
487 | 496 | ||
488 | test_search_found() { $luarocks search zlib; } | 497 | test_search_found() { $luarocks search zlib; } |
489 | test_search_missing() { $luarocks search missing_rock; } | 498 | test_search_missing() { $luarocks search missing_rock; } |
499 | test_search_version() { $luarocks search zlib 1.1; } | ||
500 | test_search_all() { $luarocks search --all; } | ||
501 | fail_search_nostring() { $var=123; $luarocks search $var; } | ||
490 | 502 | ||
491 | test_show() { $luarocks show luacov; } | 503 | test_show() { $luarocks show luacov; } |
492 | test_show_modules() { $luarocks show --modules luacov; } | 504 | test_show_modules() { $luarocks show --modules luacov; } |
493 | test_show_home() { $luarocks show --home luacov; } | 505 | test_show_home() { $luarocks show --home luacov; } |
506 | test_show_deps() { $luarocks show --deps luacov; } | ||
507 | test_show_rockspec() { $luarocks show --rockspec luacov; } | ||
508 | test_show_mversion() { $luarocks show --mversion luacov; } | ||
509 | test_show_rocktree() { $luarocks show --rock-tree luacov; } | ||
510 | test_show_rockdir() { $luarocks show --rock-dir luacov; } | ||
494 | test_show_depends() { need_luasocket; $luarocks install $luasec && $luarocks show luasec; } | 511 | test_show_depends() { need_luasocket; $luarocks install $luasec && $luarocks show luasec; } |
495 | test_show_oldversion() { $luarocks install luacov ${version_luacov} && $luarocks show luacov ${version_luacov}; } | 512 | test_show_oldversion() { $luarocks install luacov ${version_luacov} && $luarocks show luacov ${version_luacov}; } |
496 | 513 | ||
@@ -515,6 +532,7 @@ fail_admin_invalidrock() { $luarocks_admin --server=testing add invalid; } | |||
515 | test_admin_refresh_cache() { $luarocks_admin --server=testing refresh_cache; } | 532 | test_admin_refresh_cache() { $luarocks_admin --server=testing refresh_cache; } |
516 | test_admin_remove() { $luarocks_admin --server=testing remove luasocket-${verrev_luasocket}.src.rock; } | 533 | test_admin_remove() { $luarocks_admin --server=testing remove luasocket-${verrev_luasocket}.src.rock; } |
517 | fail_admin_remove_missing() { $luarocks_admin --server=testing remove; } | 534 | fail_admin_remove_missing() { $luarocks_admin --server=testing remove; } |
535 | fail_admin_split_server_url() { $luarocks_admin --server="localhost@/tmp/luarocks_testing" add "$testing_server/luasocket-${verrev_luasocket}.src.rock"; } | ||
518 | 536 | ||
519 | fail_deps_mode_invalid_arg() { $luarocks remove luacov --deps-mode; } | 537 | fail_deps_mode_invalid_arg() { $luarocks remove luacov --deps-mode; } |
520 | test_deps_mode_one() { $luarocks build --tree="system" lpeg && $luarocks list && $luarocks build --deps-mode=one --tree="$testing_tree" lxsh && [ `$luarocks_noecho list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ]; } | 538 | test_deps_mode_one() { $luarocks build --tree="system" lpeg && $luarocks list && $luarocks build --deps-mode=one --tree="$testing_tree" lxsh && [ `$luarocks_noecho list --tree="$testing_tree" --porcelain lpeg | wc -l` = 1 ]; } |
@@ -527,6 +545,7 @@ test_deps_mode_make_order() { $luarocks build --tree="$testing_sys_tree" lpeg && | |||
527 | 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}; } | 545 | 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}; } |
528 | 546 | ||
529 | test_write_rockspec() { $luarocks write_rockspec git://github.com/keplerproject/luarocks; } | 547 | test_write_rockspec() { $luarocks write_rockspec git://github.com/keplerproject/luarocks; } |
548 | test_write_rockspec_tag() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --tag=v2.3.0; } | ||
530 | test_write_rockspec_lib() { $luarocks write_rockspec git://github.com/mbalmer/luafcgi --lib=fcgi --license="3-clause BSD" --lua-version=5.1,5.2; } | 549 | test_write_rockspec_lib() { $luarocks write_rockspec git://github.com/mbalmer/luafcgi --lib=fcgi --license="3-clause BSD" --lua-version=5.1,5.2; } |
531 | test_write_rockspec_format() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --rockspec-format=1.1 --lua-version=5.1,5.2; } | 550 | test_write_rockspec_format() { $luarocks write_rockspec git://github.com/keplerproject/luarocks --rockspec-format=1.1 --lua-version=5.1,5.2; } |
532 | 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"; } | 551 | 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"; } |
@@ -574,6 +593,8 @@ fail_luajit_dependency() { | |||
574 | } | 593 | } |
575 | 594 | ||
576 | test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } | 595 | test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } |
596 | test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; } | ||
597 | fail_doc_invalid() { $luarocks doc invalid; } | ||
577 | 598 | ||
578 | # Driver ######################################### | 599 | # Driver ######################################### |
579 | 600 | ||
@@ -639,16 +660,18 @@ run_all_tests() { | |||
639 | run_all_tests $1 | 660 | run_all_tests $1 |
640 | #run_with_minimal_environment $1 | 661 | #run_with_minimal_environment $1 |
641 | 662 | ||
663 | cd "$testing_dir/.." | ||
664 | |||
642 | if [ "$travis" ] | 665 | if [ "$travis" ] |
643 | then | 666 | then |
644 | if [ "$TRAVIS" ] | 667 | if [ "$TRAVIS" ] |
645 | then | 668 | then |
646 | build_environment luacov luafilesystem luacov-coveralls | 669 | build_environment luacov luafilesystem luacov-coveralls |
647 | ( cd $testing_dir; $testing_sys_tree/bin/luacov-coveralls || echo "ok" ) | 670 | $testing_sys_tree/bin/luacov-coveralls -c "$testing_dir/luacov.config" || echo "ok" |
648 | fi | 671 | fi |
649 | $testing_sys_tree/bin/luacov -c $testing_dir/luacov.config src/luarocks src/bin | 672 | $testing_sys_tree/bin/luacov -c "$testing_dir/luacov.config" |
650 | grep "Summary" -B1 -A1000 $testing_dir/luacov.report.out | 673 | grep "Summary" -B1 -A1000 "$testing_dir/luacov.report.out" |
651 | else | 674 | else |
652 | $testing_sys_tree/bin/luacov -c $testing_dir/luacov.config src/luarocks src/bin | 675 | $testing_sys_tree/bin/luacov -c "$testing_dir/luacov.config" |
653 | cat "$testing_dir/luacov.report.out" | 676 | cat "$testing_dir/luacov.report.out" |
654 | fi | 677 | fi |