diff options
Diffstat (limited to 'spec/fetch_spec.lua')
-rw-r--r-- | spec/fetch_spec.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/fetch_spec.lua b/spec/fetch_spec.lua new file mode 100644 index 00000000..05a709e4 --- /dev/null +++ b/spec/fetch_spec.lua | |||
@@ -0,0 +1,15 @@ | |||
1 | local test_env = require("test/test_environment") | ||
2 | |||
3 | test_env.unload_luarocks() | ||
4 | local fetch = require("luarocks.fetch") | ||
5 | |||
6 | describe("Luarocks fetch test #whitebox #w_fetch", function() | ||
7 | it("Fetch url to base dir", function() | ||
8 | assert.are.same("v0.3", fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2/archive/v0.3.zip")) | ||
9 | assert.are.same("lua-compat-5.2", fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2.zip")) | ||
10 | assert.are.same("lua-compat-5.2", fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2.tar.gz")) | ||
11 | assert.are.same("lua-compat-5.2", fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2.tar.bz2")) | ||
12 | assert.are.same("parser.moon", fetch.url_to_base_dir("git://github.com/Cirru/parser.moon")) | ||
13 | assert.are.same("v0.3", fetch.url_to_base_dir("https://github.com/hishamhm/lua-compat-5.2/archive/v0.3")) | ||
14 | end) | ||
15 | end) | ||