diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2024-03-13 12:38:49 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-03-13 17:00:22 +0000 |
commit | 36d93bdf7ab347c4bf30aa84afd365c0f451b7b9 (patch) | |
tree | 403621587989614091ba0b68bf5c43ac01e47195 | |
parent | effe66976ef2b48d51bca3584964bd7159a4f21f (diff) | |
download | luarocks-36d93bdf7ab347c4bf30aa84afd365c0f451b7b9.tar.gz luarocks-36d93bdf7ab347c4bf30aa84afd365c0f451b7b9.tar.bz2 luarocks-36d93bdf7ab347c4bf30aa84afd365c0f451b7b9.zip |
tests: convert downgrade test to spec/quick
-rw-r--r-- | spec/build_spec.lua | 6 | ||||
-rw-r--r-- | spec/quick/build.q | 46 |
2 files changed, 46 insertions, 6 deletions
diff --git a/spec/build_spec.lua b/spec/build_spec.lua index 00eac2e1..08a9c93f 100644 --- a/spec/build_spec.lua +++ b/spec/build_spec.lua | |||
@@ -210,12 +210,6 @@ describe("LuaRocks build #integration", function() | |||
210 | end) | 210 | end) |
211 | end | 211 | end |
212 | 212 | ||
213 | it("downgrades directories correctly", function() | ||
214 | assert(run.luarocks_bool("build --nodeps busted 2.0.0" )) | ||
215 | assert(run.luarocks_bool("build --nodeps busted 2.0.rc13" )) | ||
216 | assert(run.luarocks_bool("build --nodeps busted 2.0.0" )) | ||
217 | end) | ||
218 | |||
219 | it("only deps", function() | 213 | it("only deps", function() |
220 | local rockspec = testing_paths.fixtures_dir .. "/build_only_deps-0.1-1.rockspec" | 214 | local rockspec = testing_paths.fixtures_dir .. "/build_only_deps-0.1-1.rockspec" |
221 | 215 | ||
diff --git a/spec/quick/build.q b/spec/quick/build.q index 6d7c4744..4d0f6f9f 100644 --- a/spec/quick/build.q +++ b/spec/quick/build.q | |||
@@ -349,3 +349,49 @@ rock_manifest = { | |||
349 | -------------------------------------------------------------------------------- | 349 | -------------------------------------------------------------------------------- |
350 | 350 | ||
351 | EXISTS: ./lua_modules/bin/my_module.lua%{wrapper_extension} | 351 | EXISTS: ./lua_modules/bin/my_module.lua%{wrapper_extension} |
352 | |||
353 | |||
354 | |||
355 | ================================================================================ | ||
356 | TEST: downgrades directories correctly | ||
357 | |||
358 | FILE: mytest-1.0-1.rockspec | ||
359 | -------------------------------------------------------------------------------- | ||
360 | rockspec_format = "3.0" | ||
361 | package = "mytest" | ||
362 | version = "1.0-1" | ||
363 | source = { | ||
364 | url = "file://%{url(%{fixtures_dir})}/an_upstream_tarball-0.1.tar.gz", | ||
365 | dir = "an_upstream_tarball-0.1", | ||
366 | } | ||
367 | build = { | ||
368 | modules = { | ||
369 | ["parent.child.my_module"] = "src/my_module.lua" | ||
370 | }, | ||
371 | } | ||
372 | -------------------------------------------------------------------------------- | ||
373 | |||
374 | FILE: mytest-2.0-1.rockspec | ||
375 | -------------------------------------------------------------------------------- | ||
376 | rockspec_format = "3.0" | ||
377 | package = "mytest" | ||
378 | version = "2.0-1" | ||
379 | source = { | ||
380 | url = "file://%{url(%{fixtures_dir})}/an_upstream_tarball-0.1.tar.gz", | ||
381 | dir = "an_upstream_tarball-0.1", | ||
382 | } | ||
383 | build = { | ||
384 | modules = { | ||
385 | ["parent.child.my_module"] = "src/my_module.lua" | ||
386 | }, | ||
387 | } | ||
388 | -------------------------------------------------------------------------------- | ||
389 | |||
390 | RUN: luarocks build ./mytest-2.0-1.rockspec | ||
391 | EXISTS: %{testing_sys_tree}/share/lua/%{lua_version}/parent/child/my_module.lua | ||
392 | |||
393 | RUN: luarocks build ./mytest-1.0-1.rockspec | ||
394 | EXISTS: %{testing_sys_tree}/share/lua/%{lua_version}/parent/child/my_module.lua | ||
395 | |||
396 | RUN: luarocks build ./mytest-2.0-1.rockspec | ||
397 | EXISTS: %{testing_sys_tree}/share/lua/%{lua_version}/parent/child/my_module.lua | ||