diff options
Diffstat (limited to 'spec/build_spec.lua')
-rw-r--r-- | spec/build_spec.lua | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/spec/build_spec.lua b/spec/build_spec.lua index 2ff7cbe6..ffae144d 100644 --- a/spec/build_spec.lua +++ b/spec/build_spec.lua | |||
@@ -63,22 +63,22 @@ describe("LuaRocks build tests #blackbox #b_build", function() | |||
63 | 63 | ||
64 | it("LuaRocks build lpeg branch=master", function() | 64 | it("LuaRocks build lpeg branch=master", function() |
65 | assert.is_true(run.luarocks_bool("build --branch=master lpeg")) | 65 | assert.is_true(run.luarocks_bool("build --branch=master lpeg")) |
66 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) | 66 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
67 | end) | 67 | end) |
68 | 68 | ||
69 | it("LuaRocks build lpeg deps-mode=123", function() | 69 | it("LuaRocks build lpeg deps-mode=123", function() |
70 | assert.is_false(run.luarocks_bool("build --deps-mode=123 lpeg --verbose")) | 70 | assert.is_false(run.luarocks_bool("build --deps-mode=123 lpeg --verbose")) |
71 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) | 71 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
72 | end) | 72 | end) |
73 | 73 | ||
74 | it("LuaRocks build lpeg only-sources example", function() | 74 | it("LuaRocks build lpeg only-sources example", function() |
75 | assert.is_true(run.luarocks_bool("download --rockspec lpeg")) | 75 | assert.is_true(run.luarocks_bool("download --rockspec lpeg")) |
76 | assert.is_false(run.luarocks_bool("build --only-sources=\"http://example.com\" lpeg-1.0.0-1.rockspec")) | 76 | assert.is_false(run.luarocks_bool("build --only-sources=\"http://example.com\" lpeg-1.0.0-1.rockspec")) |
77 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) | 77 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
78 | 78 | ||
79 | assert.is_true(run.luarocks_bool("download --source lpeg")) | 79 | assert.is_true(run.luarocks_bool("download --source lpeg")) |
80 | assert.is_true(run.luarocks_bool("build --only-sources=\"http://example.com\" lpeg-1.0.0-1.src.rock")) | 80 | assert.is_true(run.luarocks_bool("build --only-sources=\"http://example.com\" lpeg-1.0.0-1.src.rock")) |
81 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) | 81 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
82 | 82 | ||
83 | assert.is_true(os.remove("lpeg-1.0.0-1.rockspec")) | 83 | assert.is_true(os.remove("lpeg-1.0.0-1.rockspec")) |
84 | assert.is_true(os.remove("lpeg-1.0.0-1.src.rock")) | 84 | assert.is_true(os.remove("lpeg-1.0.0-1.src.rock")) |
@@ -86,7 +86,7 @@ describe("LuaRocks build tests #blackbox #b_build", function() | |||
86 | 86 | ||
87 | it("LuaRocks build lpeg with empty tree", function() | 87 | it("LuaRocks build lpeg with empty tree", function() |
88 | assert.is_false(run.luarocks_bool("build --tree=\"\" lpeg")) | 88 | assert.is_false(run.luarocks_bool("build --tree=\"\" lpeg")) |
89 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) | 89 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
90 | end) | 90 | end) |
91 | end) | 91 | end) |
92 | 92 | ||
@@ -97,17 +97,17 @@ describe("LuaRocks build tests #blackbox #b_build", function() | |||
97 | 97 | ||
98 | it("LuaRocks build luacov diff version", function() | 98 | it("LuaRocks build luacov diff version", function() |
99 | assert.is_true(run.luarocks_bool("build luacov 0.11.0-1")) | 99 | assert.is_true(run.luarocks_bool("build luacov 0.11.0-1")) |
100 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luacov/0.11.0-1/luacov-0.11.0-1.rockspec")) | 100 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luacov/0.11.0-1/luacov-0.11.0-1.rockspec")) |
101 | end) | 101 | end) |
102 | 102 | ||
103 | it("LuaRocks build command stdlib", function() | 103 | it("LuaRocks build command stdlib", function() |
104 | assert.is_true(run.luarocks_bool("build stdlib")) | 104 | assert.is_true(run.luarocks_bool("build stdlib")) |
105 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/stdlib/41.0.0-1/stdlib-41.0.0-1.rockspec")) | 105 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/stdlib/41.0.0-1/stdlib-41.0.0-1.rockspec")) |
106 | end) | 106 | end) |
107 | 107 | ||
108 | it("LuaRocks build install bin luarepl", function() | 108 | it("LuaRocks build install bin luarepl", function() |
109 | assert.is_true(run.luarocks_bool("build luarepl")) | 109 | assert.is_true(run.luarocks_bool("build luarepl")) |
110 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luarepl/0.4-1/luarepl-0.4-1.rockspec")) | 110 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luarepl/0.4-1/luarepl-0.4-1.rockspec")) |
111 | end) | 111 | end) |
112 | 112 | ||
113 | it("LuaRocks build supported platforms lpty", function() | 113 | it("LuaRocks build supported platforms lpty", function() |
@@ -115,24 +115,24 @@ describe("LuaRocks build tests #blackbox #b_build", function() | |||
115 | assert.is_false(run.luarocks_bool("build lpty")) --Error: This rockspec for lpty does not support win32, windows platforms | 115 | assert.is_false(run.luarocks_bool("build lpty")) --Error: This rockspec for lpty does not support win32, windows platforms |
116 | else | 116 | else |
117 | assert.is_true(run.luarocks_bool("build lpty")) | 117 | assert.is_true(run.luarocks_bool("build lpty")) |
118 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpty/1.0.1-1/lpty-1.0.1-1.rockspec")) | 118 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpty/1.0.1-1/lpty-1.0.1-1.rockspec")) |
119 | end | 119 | end |
120 | end) | 120 | end) |
121 | 121 | ||
122 | it("LuaRocks build luasec with skipping dependency checks", function() | 122 | it("LuaRocks build luasec with skipping dependency checks", function() |
123 | assert.is_true(run.luarocks_bool("build luasec " .. test_env.OPENSSL_DIRS .. " --nodeps")) | 123 | assert.is_true(run.luarocks_bool("build luasec " .. test_env.OPENSSL_DIRS .. " --nodeps")) |
124 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec/0.6-1/luasec-0.6-1.rockspec")) | 124 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasec/0.6-1/luasec-0.6-1.rockspec")) |
125 | end) | 125 | end) |
126 | 126 | ||
127 | it("LuaRocks build lmathx deps partial match", function() | 127 | it("LuaRocks build lmathx deps partial match", function() |
128 | assert.is_true(run.luarocks_bool("build lmathx")) | 128 | assert.is_true(run.luarocks_bool("build lmathx")) |
129 | 129 | ||
130 | if test_env.LUA_V == "5.1" or test_env.LUAJIT_V then | 130 | if test_env.LUA_V == "5.1" or test_env.LUAJIT_V then |
131 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lmathx/20120430.51-1/lmathx-20120430.51-1.rockspec")) | 131 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20120430.51-1/lmathx-20120430.51-1.rockspec")) |
132 | elseif test_env.LUA_V == "5.2" then | 132 | elseif test_env.LUA_V == "5.2" then |
133 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lmathx/20120430.52-1/lmathx-20120430.52-1.rockspec")) | 133 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20120430.52-1/lmathx-20120430.52-1.rockspec")) |
134 | elseif test_env.LUA_V == "5.3" then | 134 | elseif test_env.LUA_V == "5.3" then |
135 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lmathx/20150505-1/lmathx-20150505-1.rockspec")) | 135 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20150505-1/lmathx-20150505-1.rockspec")) |
136 | end | 136 | end |
137 | end) | 137 | end) |
138 | end) | 138 | end) |
@@ -148,15 +148,15 @@ describe("LuaRocks build tests #blackbox #b_build", function() | |||
148 | it("LuaRocks build luasec only deps", function() | 148 | it("LuaRocks build luasec only deps", function() |
149 | assert.is_true(run.luarocks_bool("build luasec " .. test_env.OPENSSL_DIRS .. " --only-deps")) | 149 | assert.is_true(run.luarocks_bool("build luasec " .. test_env.OPENSSL_DIRS .. " --only-deps")) |
150 | assert.is_false(run.luarocks_bool("show luasec")) | 150 | assert.is_false(run.luarocks_bool("show luasec")) |
151 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/luasec/0.6-1/luasec-0.6-1.rockspec")) | 151 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luasec/0.6-1/luasec-0.6-1.rockspec")) |
152 | end) | 152 | end) |
153 | 153 | ||
154 | it("LuaRocks build only deps of downloaded rockspec of lxsh", function() | 154 | it("LuaRocks build only deps of downloaded rockspec of lxsh", function() |
155 | assert.is_true(run.luarocks_bool("download --rockspec lxsh 0.8.6-2")) | 155 | assert.is_true(run.luarocks_bool("download --rockspec lxsh 0.8.6-2")) |
156 | assert.is.truthy(run.luarocks("build lxsh-0.8.6-2.rockspec --only-deps")) | 156 | assert.is.truthy(run.luarocks("build lxsh-0.8.6-2.rockspec --only-deps")) |
157 | assert.is_false(run.luarocks_bool("show lxsh")) | 157 | assert.is_false(run.luarocks_bool("show lxsh")) |
158 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 158 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
159 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) | 159 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
160 | assert.is_true(os.remove("lxsh-0.8.6-2.rockspec")) | 160 | assert.is_true(os.remove("lxsh-0.8.6-2.rockspec")) |
161 | end) | 161 | end) |
162 | 162 | ||
@@ -164,8 +164,8 @@ describe("LuaRocks build tests #blackbox #b_build", function() | |||
164 | assert.is_true(run.luarocks_bool("download --source lxsh 0.8.6-2")) | 164 | assert.is_true(run.luarocks_bool("download --source lxsh 0.8.6-2")) |
165 | assert.is.truthy(run.luarocks("build lxsh-0.8.6-2.src.rock --only-deps")) | 165 | assert.is.truthy(run.luarocks("build lxsh-0.8.6-2.src.rock --only-deps")) |
166 | assert.is_false(run.luarocks_bool("show lxsh")) | 166 | assert.is_false(run.luarocks_bool("show lxsh")) |
167 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) | 167 | assert.is.falsy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lxsh/0.8.6-2/lxsh-0.8.6-2.rockspec")) |
168 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) | 168 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lpeg/1.0.0-1/lpeg-1.0.0-1.rockspec")) |
169 | assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) | 169 | assert.is_true(os.remove("lxsh-0.8.6-2.src.rock")) |
170 | end) | 170 | end) |
171 | 171 | ||
@@ -174,7 +174,7 @@ describe("LuaRocks build tests #blackbox #b_build", function() | |||
174 | assert.is_true(run.luarocks_bool("build validate-args-1.5.4-1.rockspec")) | 174 | assert.is_true(run.luarocks_bool("build validate-args-1.5.4-1.rockspec")) |
175 | 175 | ||
176 | assert.is.truthy(run.luarocks("show validate-args")) | 176 | assert.is.truthy(run.luarocks("show validate-args")) |
177 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/validate-args/1.5.4-1/validate-args-1.5.4-1.rockspec")) | 177 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/validate-args/1.5.4-1/validate-args-1.5.4-1.rockspec")) |
178 | 178 | ||
179 | assert.is_true(os.remove("validate-args-1.5.4-1.rockspec")) | 179 | assert.is_true(os.remove("validate-args-1.5.4-1.rockspec")) |
180 | end) | 180 | end) |
@@ -185,7 +185,7 @@ describe("LuaRocks build tests #blackbox #b_build", function() | |||
185 | 185 | ||
186 | assert.is_true(run.luarocks_bool("build validate-args-1.5.4-1.rockspec")) | 186 | assert.is_true(run.luarocks_bool("build validate-args-1.5.4-1.rockspec")) |
187 | assert.is.truthy(run.luarocks("show validate-args")) | 187 | assert.is.truthy(run.luarocks("show validate-args")) |
188 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_tree .. "/lib/luarocks/rocks/validate-args/1.5.4-1/validate-args-1.5.4-1.rockspec")) | 188 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/validate-args/1.5.4-1/validate-args-1.5.4-1.rockspec")) |
189 | assert.is_true(os.remove("validate-args-1.5.4-1.rockspec")) | 189 | assert.is_true(os.remove("validate-args-1.5.4-1.rockspec")) |
190 | end) | 190 | end) |
191 | 191 | ||