summaryrefslogtreecommitdiff
path: root/spec/doc_spec.lua
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-04-05 15:50:45 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-04-11 14:38:06 -0300
commit835d21e98e95e0ed2b6b028ddb06fe87427e5488 (patch)
tree1873e77e938a013b60ef106e1fa063f41ce159c2 /spec/doc_spec.lua
parent660f088cf936dcaa65a1c7eb2793df78777ad924 (diff)
downloadluarocks-835d21e98e95e0ed2b6b028ddb06fe87427e5488.tar.gz
luarocks-835d21e98e95e0ed2b6b028ddb06fe87427e5488.tar.bz2
luarocks-835d21e98e95e0ed2b6b028ddb06fe87427e5488.zip
Add support for namespaces.
For details of the new feature, see https://github.com/luarocks/luarocks/wiki/Namespaces This ended up being a huge commit because of some major refactoring motivated by the new feature: * new modules for some object types: * `luarocks.queries` - all functions that look for rocks in local or remote repositories now use objects constructed by this module: query objects contain the name, namespace and query constraints. Dependencies in a rockspec are also stored as query objects. * `luarocks.results` - all individual results produces from queries are returned in this format: result objects contain the name, namespace, version, arch and repo. * the `results` object was renamed to `result_tree`, to better reflect that it is not an array of `result` objects. * `luarocks.vers` was removed, its functionality was moved to better locations. Specifically on namespaces: * Commands that take a rock `name` can now take `namespace/name` (and alternately `--flags=namespace` so that URLs can be also installed with a nominal namespace). * Rocks installed from a namespace now create a `rock_namespace` file alongside `rock_manifest`, which is used when matching namespaced dependencies against locally-installed rocks. * Using namespaced dependencies in a rockspec, requires `rockspec_format = "3.0"`. * Tests under the `#namespaces` hashtag, all using a local repository.
Diffstat (limited to 'spec/doc_spec.lua')
-rw-r--r--spec/doc_spec.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/doc_spec.lua b/spec/doc_spec.lua
index 5f503af2..6d91fc00 100644
--- a/spec/doc_spec.lua
+++ b/spec/doc_spec.lua
@@ -38,6 +38,14 @@ describe("LuaRocks doc tests #blackbox #b_doc", function()
38 assert.is.truthy(output:find("Local documentation directory not found")) 38 assert.is.truthy(output:find("Local documentation directory not found"))
39 end) 39 end)
40 end) 40 end)
41
42 describe("#namespaces", function()
43 it("retrieves docs for a namespaced package from the command-line", function()
44 assert(run.luarocks_bool("build a_user/a_rock --server=" .. testing_paths.fixtures_dir .. "/a_repo" ))
45 assert(run.luarocks_bool("build a_rock --keep --server=" .. testing_paths.fixtures_dir .. "/a_repo" ))
46 assert.match("a_rock 2.0", run.luarocks("doc a_user/a_rock"))
47 end)
48 end)
41 49
42 describe("LuaRocks doc tests with flags", function() 50 describe("LuaRocks doc tests with flags", function()
43 it("LuaRocks doc of installed luarepl", function() 51 it("LuaRocks doc of installed luarepl", function()