diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2017-09-13 12:46:22 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2017-09-13 12:46:22 -0300 |
commit | f1473f71235bb89555dea7041b536144d32bac8c (patch) | |
tree | 5c0b9215801ea1711c7919c1b42085d1b5687075 /test | |
parent | 1eb598706f9000361f0059a303c3cf99be5a8ceb (diff) | |
parent | 9c853b1e7ec0f30e0e539fb56d7c81edbe5c8d7d (diff) | |
download | luarocks-f1473f71235bb89555dea7041b536144d32bac8c.tar.gz luarocks-f1473f71235bb89555dea7041b536144d32bac8c.tar.bz2 luarocks-f1473f71235bb89555dea7041b536144d32bac8c.zip |
Merge branch 'luarocks-3'
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 bc1e5277..6b160140 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 | } | ||