diff options
Diffstat (limited to 'spec/make_spec.lua')
-rw-r--r-- | spec/make_spec.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/make_spec.lua b/spec/make_spec.lua index 8baa3561..1bfbce7e 100644 --- a/spec/make_spec.lua +++ b/spec/make_spec.lua | |||
@@ -15,13 +15,13 @@ local extra_rocks = { | |||
15 | "/lxsh-0.8.6-2.rockspec" | 15 | "/lxsh-0.8.6-2.rockspec" |
16 | } | 16 | } |
17 | 17 | ||
18 | describe("LuaRocks make tests #integration", function() | 18 | describe("luarocks make #integration", function() |
19 | 19 | ||
20 | before_each(function() | 20 | before_each(function() |
21 | test_env.setup_specs(extra_rocks) | 21 | test_env.setup_specs(extra_rocks) |
22 | end) | 22 | end) |
23 | 23 | ||
24 | it("LuaRocks make with no flags/arguments", function() | 24 | it("with no flags/arguments", function() |
25 | finally(function() | 25 | finally(function() |
26 | lfs.chdir(testing_paths.testrun_dir) | 26 | lfs.chdir(testing_paths.testrun_dir) |
27 | test_env.remove_dir("empty") | 27 | test_env.remove_dir("empty") |
@@ -31,7 +31,7 @@ describe("LuaRocks make tests #integration", function() | |||
31 | assert.is_false(run.luarocks_bool("make")) | 31 | assert.is_false(run.luarocks_bool("make")) |
32 | end) | 32 | end) |
33 | 33 | ||
34 | it("LuaRocks make with rockspec", function() | 34 | it("with rockspec", function() |
35 | finally(function() | 35 | finally(function() |
36 | -- delete downloaded and unpacked files | 36 | -- delete downloaded and unpacked files |
37 | lfs.chdir(testing_paths.testrun_dir) | 37 | lfs.chdir(testing_paths.testrun_dir) |
@@ -50,7 +50,7 @@ describe("LuaRocks make tests #integration", function() | |||
50 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket/3.0rc1-2/luasocket-3.0rc1-2.rockspec")) | 50 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasocket/3.0rc1-2/luasocket-3.0rc1-2.rockspec")) |
51 | end) | 51 | end) |
52 | 52 | ||
53 | it("LuaRocks make --no-doc", function() | 53 | it("--no-doc", function() |
54 | finally(function() | 54 | finally(function() |
55 | lfs.chdir(testing_paths.testrun_dir) | 55 | lfs.chdir(testing_paths.testrun_dir) |
56 | test_env.remove_dir("luasocket-3.0rc1-2") | 56 | test_env.remove_dir("luasocket-3.0rc1-2") |
@@ -81,7 +81,7 @@ describe("LuaRocks make tests #integration", function() | |||
81 | assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) | 81 | assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) |
82 | end) | 82 | end) |
83 | 83 | ||
84 | it("LuaRocks make default rockspec", function() | 84 | it("default rockspec", function() |
85 | assert.is_true(run.luarocks_bool("new_version lxsh-0.8.6-2.rockspec")) | 85 | assert.is_true(run.luarocks_bool("new_version lxsh-0.8.6-2.rockspec")) |
86 | assert.is_true(run.luarocks_bool("make")) | 86 | assert.is_true(run.luarocks_bool("make")) |
87 | 87 | ||
@@ -89,7 +89,7 @@ describe("LuaRocks make tests #integration", function() | |||
89 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-3/lxsh-0.8.6-3.rockspec")) | 89 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-3/lxsh-0.8.6-3.rockspec")) |
90 | end) | 90 | end) |
91 | 91 | ||
92 | it("LuaRocks make unnamed rockspec", function() | 92 | it("unnamed rockspec", function() |
93 | finally(function() | 93 | finally(function() |
94 | os.remove("rockspec") | 94 | os.remove("rockspec") |
95 | end) | 95 | end) |
@@ -101,7 +101,7 @@ describe("LuaRocks make tests #integration", function() | |||
101 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 101 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
102 | end) | 102 | end) |
103 | 103 | ||
104 | it("LuaRocks make ambiguous rockspec", function() | 104 | it("ambiguous rockspec", function() |
105 | assert.is.truthy(os.rename("lxsh-0.8.6-2.rockspec", "lxsh2-0.8.6-2.rockspec")) | 105 | assert.is.truthy(os.rename("lxsh-0.8.6-2.rockspec", "lxsh2-0.8.6-2.rockspec")) |
106 | local output = run.luarocks("make") | 106 | local output = run.luarocks("make") |
107 | assert.is.truthy(output:match("Error: Inconsistency between rockspec filename")) | 107 | assert.is.truthy(output:match("Error: Inconsistency between rockspec filename")) |
@@ -110,7 +110,7 @@ describe("LuaRocks make tests #integration", function() | |||
110 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 110 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
111 | end) | 111 | end) |
112 | 112 | ||
113 | it("LuaRocks make ambiguous unnamed rockspec", function() | 113 | it("ambiguous unnamed rockspec", function() |
114 | assert.is.truthy(os.rename("lxsh-0.8.6-2.rockspec", "1_rockspec")) | 114 | assert.is.truthy(os.rename("lxsh-0.8.6-2.rockspec", "1_rockspec")) |
115 | test_env.copy("1_rockspec", "2_rockspec") | 115 | test_env.copy("1_rockspec", "2_rockspec") |
116 | local output = run.luarocks("make") | 116 | local output = run.luarocks("make") |
@@ -120,7 +120,7 @@ describe("LuaRocks make tests #integration", function() | |||
120 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 120 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
121 | end) | 121 | end) |
122 | 122 | ||
123 | it("LuaRocks make pack binary rock", function() | 123 | it("pack binary rock", function() |
124 | assert.is_true(run.luarocks_bool("make --deps-mode=none --pack-binary-rock")) | 124 | assert.is_true(run.luarocks_bool("make --deps-mode=none --pack-binary-rock")) |
125 | assert.is.truthy(lfs.attributes("lxsh-0.8.6-2.all.rock")) | 125 | assert.is.truthy(lfs.attributes("lxsh-0.8.6-2.all.rock")) |
126 | end) | 126 | end) |
@@ -244,7 +244,7 @@ describe("LuaRocks make tests #integration", function() | |||
244 | end) | 244 | end) |
245 | end) | 245 | end) |
246 | 246 | ||
247 | describe("#ddt LuaRocks make upgrading rockspecs with double deploy types", function() | 247 | describe("#ddt upgrading rockspecs with double deploy types", function() |
248 | local deploy_lib_dir = testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION | 248 | local deploy_lib_dir = testing_paths.testing_sys_tree .. "/lib/lua/"..env_variables.LUA_VERSION |
249 | local deploy_lua_dir = testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION | 249 | local deploy_lua_dir = testing_paths.testing_sys_tree .. "/share/lua/"..env_variables.LUA_VERSION |
250 | local so = test_env.lib_extension | 250 | local so = test_env.lib_extension |
@@ -347,7 +347,7 @@ describe("LuaRocks make tests #integration", function() | |||
347 | end) | 347 | end) |
348 | end) | 348 | end) |
349 | 349 | ||
350 | describe("LuaRocks make upgrading rockspecs with mixed deploy types", function() | 350 | describe("upgrading rockspecs with mixed deploy types", function() |
351 | before_each(function() | 351 | before_each(function() |
352 | test_env.copy_dir(testing_paths.fixtures_dir .. "/mixed_deploy_type", "mdt") | 352 | test_env.copy_dir(testing_paths.fixtures_dir .. "/mixed_deploy_type", "mdt") |
353 | end) | 353 | end) |