aboutsummaryrefslogtreecommitdiff
path: root/spec/unpack_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unpack_spec.lua')
-rw-r--r--spec/unpack_spec.lua25
1 files changed, 13 insertions, 12 deletions
diff --git a/spec/unpack_spec.lua b/spec/unpack_spec.lua
index 9b1e2b9a..00d6781f 100644
--- a/spec/unpack_spec.lua
+++ b/spec/unpack_spec.lua
@@ -1,12 +1,13 @@
1local test_env = require("spec.util.test_env") 1local test_env = require("spec.util.test_env")
2local lfs = require("lfs")
2local run = test_env.run 3local run = test_env.run
3local testing_paths = test_env.testing_paths 4local testing_paths = test_env.testing_paths
4 5
5test_env.unload_luarocks() 6test_env.unload_luarocks()
6 7
7local extra_rocks = { 8local extra_rocks = {
8 "/cprint-0.1-2.src.rock", 9 "/cprint-${CPRINT}.src.rock",
9 "/cprint-0.1-2.rockspec", 10 "/cprint-${CPRINT}.rockspec",
10 "/luazip-1.2.4-1.rockspec" 11 "/luazip-1.2.4-1.rockspec"
11} 12}
12 13
@@ -33,22 +34,22 @@ describe("luarocks unpack #integration", function()
33 describe("more complex tests", function() 34 describe("more complex tests", function()
34 it("download", function() 35 it("download", function()
35 assert.is_true(run.luarocks_bool("unpack cprint")) 36 assert.is_true(run.luarocks_bool("unpack cprint"))
36 test_env.remove_dir("cprint-0.1-2") 37 test_env.remove_dir("cprint-${CPRINT}")
37 end) 38 end)
38 39
39 it("src", function() 40 it("src", function()
40 assert.is_true(run.luarocks_bool("download --source cprint")) 41 assert.is_true(run.luarocks_bool("download --source cprint"))
41 assert.is_true(run.luarocks_bool("unpack cprint-0.1-2.src.rock")) 42 assert.is_true(run.luarocks_bool("unpack cprint-${CPRINT}.src.rock"))
42 os.remove("cprint-0.1-2.src.rock") 43 os.remove("cprint-${CPRINT}.src.rock")
43 test_env.remove_dir("cprint-0.1-2") 44 test_env.remove_dir("cprint-${CPRINT}")
44 end) 45 end)
45 46
46 it("src", function() 47 it("src", function()
47 assert.is_true(run.luarocks_bool("download --rockspec cprint")) 48 assert.is_true(run.luarocks_bool("download --rockspec cprint"))
48 assert.is_true(run.luarocks_bool("unpack cprint-0.1-2.rockspec")) 49 assert.is_true(run.luarocks_bool("unpack cprint-${CPRINT}.rockspec"))
49 os.remove("cprint-0.1-2.rockspec") 50 os.remove("cprint-${CPRINT}.rockspec")
50 os.remove("lua-cprint") 51 os.remove("lua-cprint")
51 test_env.remove_dir("cprint-0.1-2") 52 test_env.remove_dir("cprint-${CPRINT}")
52 end) 53 end)
53 54
54 -- #595 luarocks unpack of a git:// rockspec fails to copy the rockspec 55 -- #595 luarocks unpack of a git:// rockspec fails to copy the rockspec
@@ -62,9 +63,9 @@ describe("luarocks unpack #integration", function()
62 it("binary", function() 63 it("binary", function()
63 assert.is_true(run.luarocks_bool("build cprint")) 64 assert.is_true(run.luarocks_bool("build cprint"))
64 assert.is_true(run.luarocks_bool("pack cprint")) 65 assert.is_true(run.luarocks_bool("pack cprint"))
65 assert.is_true(run.luarocks_bool("unpack cprint-0.1-2." .. test_env.platform .. ".rock")) 66 assert.is_true(run.luarocks_bool("unpack cprint-${CPRINT}." .. test_env.platform .. ".rock"))
66 test_env.remove_dir("cprint-0.1-2") 67 test_env.remove_dir("cprint-${CPRINT}")
67 os.remove("cprint-0.1-2." .. test_env.platform .. ".rock") 68 os.remove("cprint-${CPRINT}." .. test_env.platform .. ".rock")
68 end) 69 end)
69 end) 70 end)
70end) 71end)