From a06f4c564849b09eebeade776ebc01c6b97523f9 Mon Sep 17 00:00:00 2001 From: roboo Date: Sat, 19 Mar 2016 11:59:17 +0100 Subject: Small addition to test suite #GSoC --- test/testing.lua | 6 ++++++ test/testing.sh | 3 +++ 2 files changed, 9 insertions(+) (limited to 'test') 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 = { fail_arg_string_followed_by_flag = function() return run "$luarocks --server --porcelain" end, fail_arg_string_unknown = function() return run "$luarocks --invalid-flag=abc" end, test_empty_list = function() return run "$luarocks list" end, + test_list_outdated = function () return run "$luarocks list --outdated" end, fail_sysconfig_err = function() mkdir "$testing_lrprefix/etc/luarocks" file_set_contents("$testing_lrprefix/etc/luarocks/config.lua", "aoeui") @@ -441,6 +442,11 @@ local tests = { return run "$luarocks install luarepl" and run "$luarocks doc luarepl" end, + test_doc_home = function() + return run "$luarocks install luacov" + and run "$luarocks doc luacov --home" + end, + fail_doc_invalid = function () return run "$luarocks doc invalid" end, -- Tests for https://github.com/keplerproject/luarocks/issues/375 test_fetch_base_dir = function() diff --git a/test/testing.sh b/test/testing.sh index 4be71fa6..cede94c2 100755 --- a/test/testing.sh +++ b/test/testing.sh @@ -341,6 +341,7 @@ fail_arg_string_followed_by_flag() { $luarocks --server --porcelain; } fail_arg_string_unknown() { $luarocks --invalid-flag=abc; } test_empty_list() { $luarocks list; } +test_list_outdated() { $luarocks list --outdated; } 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"; } 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"; } @@ -524,6 +525,8 @@ EOF } test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } +test_doc_home() { $luarocks install luacov; $luarocks doc luacov --home; } +fail_doc_invalid() { $luarocks doc invalid; } # Driver ######################################### -- cgit v1.2.3-55-g6feb