diff options
| author | Mike Vink <mike@pionative.com> | 2025-02-03 21:29:42 +0100 |
|---|---|---|
| committer | Mike Vink <mike@pionative.com> | 2025-02-03 21:29:42 +0100 |
| commit | 5155816b7b925dec5d5feb1568b1d7ceb00938b9 (patch) | |
| tree | deca28ea15e79f6f804c3d90d2ba757881638af5 /spec/list_spec.lua | |
Diffstat (limited to 'spec/list_spec.lua')
| -rw-r--r-- | spec/list_spec.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/list_spec.lua b/spec/list_spec.lua new file mode 100644 index 0000000..08d8587 --- /dev/null +++ b/spec/list_spec.lua @@ -0,0 +1,34 @@ +local test_env = require("spec.util.test_env") +local V = test_env.V +local run = test_env.run +local testing_paths = test_env.testing_paths + +local extra_rocks = { + "/say-1.0-1.src.rock", + "/say-1.2-1.src.rock" +} + +describe("luarocks list #integration", function() + + before_each(function() + test_env.setup_specs(extra_rocks) + end) + + it("with no flags/arguments", function() + local output = run.luarocks("list") + assert.match("luacov", output) + end) + + it("shows version number", function() + local output = run.luarocks("list") + assert.is.truthy(output:find("luacov")) + assert.matches(V"${LUACOV}", output, 1, true) + end) + + it("LuaRocks install outdated and list it", function() + assert.is_true(run.luarocks_bool("install say 1.0-1")) + local output = run.luarocks("list --outdated") + assert.is.truthy(output:find("say")) + assert.matches("1.0-1 < ", output, 1, true) + end) +end) |
