diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-06-05 01:58:48 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-06-06 12:39:23 -0300 |
commit | 35d139407db87349e8ccc11e0e1696b610d9582e (patch) | |
tree | 4b58ebeb75c96a83cab3505f2cf09c77627d2f2a /spec/fetch_spec.lua | |
parent | 03223a93763675520a2b5e16bb6ffeb871de332a (diff) | |
download | luarocks-35d139407db87349e8ccc11e0e1696b610d9582e.tar.gz luarocks-35d139407db87349e8ccc11e0e1696b610d9582e.tar.bz2 luarocks-35d139407db87349e8ccc11e0e1696b610d9582e.zip |
General refactor introducing Rockspec and Build.Opts objects
Adds a Rockspec object responsible for constructing all Rockspec
tables in the manner of the Queries and Results objects, and
a type-checked Build.Opts tables for build options, since
the number of attributes passed around was getting out of hand.
This allowed a major cleanup in the luarocks.build,
luarocks.fetch and luarocks.cmd.write_rockspec modules.
Diffstat (limited to 'spec/fetch_spec.lua')
-rw-r--r-- | spec/fetch_spec.lua | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/spec/fetch_spec.lua b/spec/fetch_spec.lua index c02c5736..aa107970 100644 --- a/spec/fetch_spec.lua +++ b/spec/fetch_spec.lua | |||
@@ -208,15 +208,6 @@ describe("Luarocks fetch test #unit", function() | |||
208 | end) | 208 | end) |
209 | end) | 209 | end) |
210 | 210 | ||
211 | describe("fetch.url_to_base_dir", function() | ||
212 | assert.are.same("v0.3", fetch.url_to_base_dir("https://example.com/hishamhm/lua-compat-5.2/archive/v0.3.zip")) | ||
213 | assert.are.same("lua-compat-5.2", fetch.url_to_base_dir("https://example.com/hishamhm/lua-compat-5.2.zip")) | ||
214 | assert.are.same("lua-compat-5.2", fetch.url_to_base_dir("https://example.com/hishamhm/lua-compat-5.2.tar.gz")) | ||
215 | assert.are.same("lua-compat-5.2", fetch.url_to_base_dir("https://example.com/hishamhm/lua-compat-5.2.tar.bz2")) | ||
216 | assert.are.same("parser.moon", fetch.url_to_base_dir("git://example.com/Cirru/parser.moon")) | ||
217 | assert.are.same("v0.3", fetch.url_to_base_dir("https://example.com/hishamhm/lua-compat-5.2/archive/v0.3")) | ||
218 | end) | ||
219 | |||
220 | describe("fetch.load_local_rockspec", function() | 211 | describe("fetch.load_local_rockspec", function() |
221 | it("returns a table representing the rockspec from the given file skipping some checks if the quick argument is enabled", function() | 212 | it("returns a table representing the rockspec from the given file skipping some checks if the quick argument is enabled", function() |
222 | local rockspec = fetch.load_local_rockspec(testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec", true) | 213 | local rockspec = fetch.load_local_rockspec(testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec", true) |