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