aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2017-09-13 12:46:22 -0300
committerHisham Muhammad <hisham@gobolinux.org>2017-09-13 12:46:22 -0300
commitf1473f71235bb89555dea7041b536144d32bac8c (patch)
tree5c0b9215801ea1711c7919c1b42085d1b5687075 /test
parent1eb598706f9000361f0059a303c3cf99be5a8ceb (diff)
parent9c853b1e7ec0f30e0e539fb56d7c81edbe5c8d7d (diff)
downloadluarocks-f1473f71235bb89555dea7041b536144d32bac8c.tar.gz
luarocks-f1473f71235bb89555dea7041b536144d32bac8c.tar.bz2
luarocks-f1473f71235bb89555dea7041b536144d32bac8c.zip
Merge branch 'luarocks-3'
Diffstat (limited to 'test')
-rw-r--r--test/test_environment.lua6
-rw-r--r--test/testfiles/luajit-fail-1.0-1.rockspec22
-rw-r--r--test/testfiles/luajit-success-1.0-1.rockspec23
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)
452end 452end
453 453
454local function create_paths(luaversion_full) 454local 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 @@
1package = "luajit-fail"
2version = "1.0-1"
3source = {
4 url = "https://raw.githubusercontent.com/keplerproject/luarocks/master/test/testing.lua",
5}
6description = {
7 summary = "Test luajit dependency fail",
8 detailed = [[
9Fail luajit dependency when running with rockspec_format < 3.0.
10]],
11 homepage = "http://luarocks.org/",
12 license = "MIT/X license"
13}
14dependencies = {
15 "luajit >= 2.0"
16}
17build = {
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 @@
1rockspec_format = "3.0"
2package = "luajit-success"
3version = "1.0-1"
4source = {
5 url = "https://raw.githubusercontent.com/keplerproject/luarocks/master/test/testing.lua",
6}
7description = {
8 summary = "Test luajit dependency fail",
9 detailed = [[
10Use luajit dependency when running with rockspec_format >= 3.0.
11]],
12 homepage = "http://luarocks.org/",
13 license = "MIT/X license"
14}
15dependencies = {
16 "luajit >= 2.0"
17}
18build = {
19 type = "builtin",
20 modules = {
21 testing = "testing.lua"
22 }
23}