diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/show_spec.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/show_spec.lua b/spec/show_spec.lua index a0987de0..c2840d29 100644 --- a/spec/show_spec.lua +++ b/spec/show_spec.lua | |||
@@ -78,6 +78,17 @@ describe("LuaRocks show #integration", function() | |||
78 | run.luarocks_bool("show luacov 0.13.0") | 78 | run.luarocks_bool("show luacov 0.13.0") |
79 | end) | 79 | end) |
80 | 80 | ||
81 | it("can find by substring", function() | ||
82 | assert(run.luarocks_bool("install has_build_dep --server=" .. testing_paths.fixtures_dir .. "/a_repo" )) | ||
83 | assert.match("a_build_dep", run.luarocks("show has_")) | ||
84 | end) | ||
85 | |||
86 | it("fails when substring matches multiple", function() | ||
87 | assert(run.luarocks_bool("install has_build_dep --server=" .. testing_paths.fixtures_dir .. "/a_repo" )) | ||
88 | assert(run.luarocks_bool("install a_build_dep --server=" .. testing_paths.fixtures_dir .. "/a_repo" )) | ||
89 | assert.match("multiple installed packages match the name 'dep'", run.luarocks("show dep")) | ||
90 | end) | ||
91 | |||
81 | it("shows #build_dependencies", function() | 92 | it("shows #build_dependencies", function() |
82 | assert(run.luarocks_bool("install has_build_dep --server=" .. testing_paths.fixtures_dir .. "/a_repo" )) | 93 | assert(run.luarocks_bool("install has_build_dep --server=" .. testing_paths.fixtures_dir .. "/a_repo" )) |
83 | assert.match("a_build_dep", run.luarocks("show has_build_dep")) | 94 | assert.match("a_build_dep", run.luarocks("show has_build_dep")) |