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/search_spec.lua | |
Diffstat (limited to 'spec/search_spec.lua')
| -rw-r--r-- | spec/search_spec.lua | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/search_spec.lua b/spec/search_spec.lua new file mode 100644 index 0000000..6d71e00 --- /dev/null +++ b/spec/search_spec.lua @@ -0,0 +1,33 @@ +local test_env = require("spec.util.test_env") +local run = test_env.run + +local extra_rocks = { +"/lzlib-0.4.1.53-1.src.rock" +} + +describe("luarocks search #integration", function() + + before_each(function() + test_env.setup_specs(extra_rocks) + end) + + it("with no flags/arguments", function() + assert.is_false(run.luarocks_bool("search")) + end) + + it("zlib", function() + assert.is_true(run.luarocks_bool("search zlib")) + end) + + it("zlib 1.1", function() + assert.is_true(run.luarocks_bool("search zlib 1.1")) + end) + + it("missing rock", function() + assert.is_true(run.luarocks_bool("search missing_rock")) + end) + + it("with flag all", function() + assert.is_true(run.luarocks_bool("search --all")) + end) +end) |
