diff options
Diffstat (limited to 'spec/util_spec.lua')
-rw-r--r-- | spec/util_spec.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/util_spec.lua b/spec/util_spec.lua index 9118ffc9..23e3ebd8 100644 --- a/spec/util_spec.lua +++ b/spec/util_spec.lua | |||
@@ -34,13 +34,16 @@ describe("Basic tests #blackbox #b_util", function() | |||
34 | local delete_path = lfs.currentdir() | 34 | local delete_path = lfs.currentdir() |
35 | assert.is_true(os.remove(delete_path)) | 35 | assert.is_true(os.remove(delete_path)) |
36 | 36 | ||
37 | assert.is_false(run.luarocks_bool(" ")) | 37 | local output = run.luarocks("") |
38 | assert.is.falsy(output:find("LuaRocks scm, a module deployment system for Lua")) | ||
38 | assert.is_true(lfs.chdir(main_path)) | 39 | assert.is_true(lfs.chdir(main_path)) |
39 | assert.is_true(run.luarocks_bool(" ")) | 40 | |
41 | output = run.luarocks("") | ||
42 | assert.is.truthy(output:find("LuaRocks scm, a module deployment system for Lua")) | ||
40 | end) | 43 | end) |
41 | 44 | ||
42 | it("LuaRocks timeout", function() | 45 | it("LuaRocks timeout", function() |
43 | assert.is_true(run.luarocks_bool("--timeout=10")) | 46 | assert.is.truthy(run.luarocks("--timeout=10")) |
44 | end) | 47 | end) |
45 | 48 | ||
46 | it("LuaRocks timeout invalid", function() | 49 | it("LuaRocks timeout invalid", function() |
@@ -48,7 +51,7 @@ describe("Basic tests #blackbox #b_util", function() | |||
48 | end) | 51 | end) |
49 | 52 | ||
50 | it("LuaRocks only server=testing", function() | 53 | it("LuaRocks only server=testing", function() |
51 | assert.is_true(run.luarocks_bool("--only-server=testing")) | 54 | assert.is.truthy(run.luarocks("--only-server=testing")) |
52 | end) | 55 | end) |
53 | 56 | ||
54 | it("LuaRocks test site config", function() | 57 | it("LuaRocks test site config", function() |
@@ -56,7 +59,7 @@ describe("Basic tests #blackbox #b_util", function() | |||
56 | assert.is.falsy(lfs.attributes("src/luarocks/site_config.lua")) | 59 | assert.is.falsy(lfs.attributes("src/luarocks/site_config.lua")) |
57 | assert.is.truthy(lfs.attributes("src/luarocks/site_config.lua.tmp")) | 60 | assert.is.truthy(lfs.attributes("src/luarocks/site_config.lua.tmp")) |
58 | 61 | ||
59 | assert.is_true(run.luarocks_bool("")) | 62 | assert.is.truthy(run.luarocks("")) |
60 | 63 | ||
61 | assert.is.truthy(os.rename("src/luarocks/site_config.lua.tmp", "src/luarocks/site_config.lua")) | 64 | assert.is.truthy(os.rename("src/luarocks/site_config.lua.tmp", "src/luarocks/site_config.lua")) |
62 | assert.is.falsy(lfs.attributes("src/luarocks/site_config.lua.tmp")) | 65 | assert.is.falsy(lfs.attributes("src/luarocks/site_config.lua.tmp")) |