diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/install_spec.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/install_spec.lua b/spec/install_spec.lua index 8a3ede3a..431ca39d 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua | |||
@@ -98,6 +98,17 @@ describe("luarocks install #integration", function() | |||
98 | assert(lfs.attributes(testing_paths.testing_sys_rocks .. "/a_rock/2.0-1/rock_namespace")) | 98 | assert(lfs.attributes(testing_paths.testing_sys_rocks .. "/a_rock/2.0-1/rock_namespace")) |
99 | end) | 99 | end) |
100 | 100 | ||
101 | it("installs a namespaced package given an URL and any string in --namespace", function() | ||
102 | -- This is not a "valid" namespace (as per luarocks.org rules) | ||
103 | -- but we're not doing any format checking in the luarocks codebase | ||
104 | -- so this keeps our options open. | ||
105 | assert(run.luarocks_bool("install --namespace=x.y@z file://" .. testing_paths.fixtures_dir .. "/a_rock-1.0-1.src.rock" )) | ||
106 | assert.truthy(run.luarocks_bool("show a_rock 1.0")) | ||
107 | local fd = assert(io.open(testing_paths.testing_sys_rocks .. "/a_rock/1.0-1/rock_namespace", "r")) | ||
108 | finally(function() fd:close() end) | ||
109 | assert.same("x.y@z", fd:read("*l")) | ||
110 | end) | ||
111 | |||
101 | it("installs a package with a namespaced dependency", function() | 112 | it("installs a package with a namespaced dependency", function() |
102 | assert(run.luarocks_bool("install has_namespaced_dep --server=" .. testing_paths.fixtures_dir .. "/a_repo" )) | 113 | assert(run.luarocks_bool("install has_namespaced_dep --server=" .. testing_paths.fixtures_dir .. "/a_repo" )) |
103 | assert(run.luarocks_bool("show has_namespaced_dep")) | 114 | assert(run.luarocks_bool("show has_namespaced_dep")) |