diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2016-03-19 23:30:04 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2016-03-19 23:30:04 -0300 |
commit | f81fd2316d62e2ef64a6b46ba6fb088ea6d5f992 (patch) | |
tree | e4e5c6575e25a347f9aeb81aba36917c218f37a3 /test | |
parent | e124b8dd7c41940a266eb87e1e66d5fa7f90cf55 (diff) | |
parent | a06f4c564849b09eebeade776ebc01c6b97523f9 (diff) | |
download | luarocks-f81fd2316d62e2ef64a6b46ba6fb088ea6d5f992.tar.gz luarocks-f81fd2316d62e2ef64a6b46ba6fb088ea6d5f992.tar.bz2 luarocks-f81fd2316d62e2ef64a6b46ba6fb088ea6d5f992.zip |
Merge pull request #522 from robooo/master
Small addition to test suite #GSoC
Diffstat (limited to 'test')
-rw-r--r-- | test/testing.lua | 6 | ||||
-rwxr-xr-x | test/testing.sh | 3 |
2 files changed, 9 insertions, 0 deletions
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 f29a9cc6..597b4094 100755 --- a/test/testing.sh +++ b/test/testing.sh | |||
@@ -341,6 +341,7 @@ 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 | test_empty_list() { $luarocks list; } | 343 | test_empty_list() { $luarocks list; } |
344 | test_list_outdated() { $luarocks list --outdated; } | ||
344 | 345 | ||
345 | 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"; } | 346 | 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"; } |
346 | 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"; } | 347 | 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"; } |
@@ -528,6 +529,8 @@ EOF | |||
528 | } | 529 | } |
529 | 530 | ||
530 | test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } | 531 | test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } |
532 | test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; } | ||
533 | fail_doc_invalid() { $luarocks doc invalid; } | ||
531 | 534 | ||
532 | # Driver ######################################### | 535 | # Driver ######################################### |
533 | 536 | ||