diff options
| author | Hisham <hisham@gobolinux.org> | 2016-10-30 23:32:30 -0200 |
|---|---|---|
| committer | Hisham <hisham@gobolinux.org> | 2016-10-30 23:32:30 -0200 |
| commit | 27be765c4a846c0d4e970e154b29cbab1a833738 (patch) | |
| tree | 1436b7eed4dc61a8b9df0cfed512b477d9a8f8ac /test | |
| parent | ba1ba4be6e0ecc6936c49fae38c71e22250ceb65 (diff) | |
| parent | f8bd89d27323403dd9de9772a7974b439b37b29d (diff) | |
| download | luarocks-27be765c4a846c0d4e970e154b29cbab1a833738.tar.gz luarocks-27be765c4a846c0d4e970e154b29cbab1a833738.tar.bz2 luarocks-27be765c4a846c0d4e970e154b29cbab1a833738.zip | |
Merge branch 'new-cmd-dir'
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_environment.lua | 6 | ||||
| -rw-r--r-- | test/testfiles/luajit-fail-1.0-1.rockspec | 22 | ||||
| -rw-r--r-- | test/testfiles/luajit-success-1.0-1.rockspec | 23 |
3 files changed, 48 insertions, 3 deletions
diff --git a/test/test_environment.lua b/test/test_environment.lua index 196202df..76dee718 100644 --- a/test/test_environment.lua +++ b/test/test_environment.lua | |||
| @@ -452,7 +452,7 @@ local function reset_environment(testing_paths, md5sums) | |||
| 452 | end | 452 | end |
| 453 | 453 | ||
| 454 | local function create_paths(luaversion_full) | 454 | local function create_paths(luaversion_full) |
| 455 | local cfg = require("luarocks.cfg") | 455 | local cfg = require("luarocks.core.cfg") |
| 456 | 456 | ||
| 457 | local testing_paths = {} | 457 | local testing_paths = {} |
| 458 | testing_paths.luadir = cfg.variables.LUA_BINDIR:gsub("/bin/?$", "") | 458 | testing_paths.luadir = cfg.variables.LUA_BINDIR:gsub("/bin/?$", "") |
| @@ -513,8 +513,8 @@ function test_env.setup_specs(extra_rocks) | |||
| 513 | test_env.main() | 513 | test_env.main() |
| 514 | package.path = test_env.env_variables.LUA_PATH | 514 | package.path = test_env.env_variables.LUA_PATH |
| 515 | 515 | ||
| 516 | test_env.platform = execute_output(test_env.testing_paths.lua .. " -e \"print(require('luarocks.cfg').arch)\"", false, test_env.env_variables) | 516 | test_env.platform = execute_output(test_env.testing_paths.lua .. " -e \"print(require('luarocks.core.cfg').arch)\"", false, test_env.env_variables) |
| 517 | test_env.lib_extension = execute_output(test_env.testing_paths.lua .. " -e \"print(require('luarocks.cfg').lib_extension)\"", false, test_env.env_variables) | 517 | test_env.lib_extension = execute_output(test_env.testing_paths.lua .. " -e \"print(require('luarocks.core.cfg').lib_extension)\"", false, test_env.env_variables) |
| 518 | test_env.wrapper_extension = test_env.TEST_TARGET_OS == "windows" and ".bat" or "" | 518 | test_env.wrapper_extension = test_env.TEST_TARGET_OS == "windows" and ".bat" or "" |
| 519 | test_env.md5sums = create_md5sums(test_env.testing_paths) | 519 | test_env.md5sums = create_md5sums(test_env.testing_paths) |
| 520 | test_env.setup_done = true | 520 | test_env.setup_done = true |
diff --git a/test/testfiles/luajit-fail-1.0-1.rockspec b/test/testfiles/luajit-fail-1.0-1.rockspec new file mode 100644 index 00000000..f8204600 --- /dev/null +++ b/test/testfiles/luajit-fail-1.0-1.rockspec | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | package = "luajit-fail" | ||
| 2 | version = "1.0-1" | ||
| 3 | source = { | ||
| 4 | url = "https://raw.githubusercontent.com/keplerproject/luarocks/master/test/testing.lua", | ||
| 5 | } | ||
| 6 | description = { | ||
| 7 | summary = "Test luajit dependency fail", | ||
| 8 | detailed = [[ | ||
| 9 | Fail luajit dependency when running with rockspec_format < 3.0. | ||
| 10 | ]], | ||
| 11 | homepage = "http://luarocks.org/", | ||
| 12 | license = "MIT/X license" | ||
| 13 | } | ||
| 14 | dependencies = { | ||
| 15 | "luajit >= 2.0" | ||
| 16 | } | ||
| 17 | build = { | ||
| 18 | type = "builtin", | ||
| 19 | modules = { | ||
| 20 | testing = "testing.lua" | ||
| 21 | } | ||
| 22 | } | ||
diff --git a/test/testfiles/luajit-success-1.0-1.rockspec b/test/testfiles/luajit-success-1.0-1.rockspec new file mode 100644 index 00000000..31c930c3 --- /dev/null +++ b/test/testfiles/luajit-success-1.0-1.rockspec | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | rockspec_format = "3.0" | ||
| 2 | package = "luajit-success" | ||
| 3 | version = "1.0-1" | ||
| 4 | source = { | ||
| 5 | url = "https://raw.githubusercontent.com/keplerproject/luarocks/master/test/testing.lua", | ||
| 6 | } | ||
| 7 | description = { | ||
| 8 | summary = "Test luajit dependency fail", | ||
| 9 | detailed = [[ | ||
| 10 | Use luajit dependency when running with rockspec_format >= 3.0. | ||
| 11 | ]], | ||
| 12 | homepage = "http://luarocks.org/", | ||
| 13 | license = "MIT/X license" | ||
| 14 | } | ||
| 15 | dependencies = { | ||
| 16 | "luajit >= 2.0" | ||
| 17 | } | ||
| 18 | build = { | ||
| 19 | type = "builtin", | ||
| 20 | modules = { | ||
| 21 | testing = "testing.lua" | ||
| 22 | } | ||
| 23 | } | ||
