aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-10-19 18:46:21 -0200
committerHisham Muhammad <hisham@gobolinux.org>2015-10-19 18:46:45 -0200
commitf8179800d0eccaef960442a7e65b1e305f3a96d5 (patch)
treea16878df7e9f602ae58baae7ba08c003e0672798 /test
parent24049bffb8069ceff1a4e0f4367389c531188fef (diff)
downloadluarocks-f8179800d0eccaef960442a7e65b1e305f3a96d5.tar.gz
luarocks-f8179800d0eccaef960442a7e65b1e305f3a96d5.tar.bz2
luarocks-f8179800d0eccaef960442a7e65b1e305f3a96d5.zip
Support "luajit" as a provided dependency in rockspec format 3.0
Diffstat (limited to 'test')
-rw-r--r--test/testfiles/luajit-fail-1.0-1.rockspec22
-rw-r--r--test/testfiles/luajit-success-1.0-1.rockspec23
-rwxr-xr-xtest/testing.sh8
3 files changed, 53 insertions, 0 deletions
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}
diff --git a/test/testing.sh b/test/testing.sh
index 7292c75d..5ae6bb35 100755
--- a/test/testing.sh
+++ b/test/testing.sh
@@ -224,6 +224,7 @@ luarocks_noecho="run_lua --noecho luarocks"
224luarocks_noecho_nocov="run_lua --noecho --nocov luarocks" 224luarocks_noecho_nocov="run_lua --noecho --nocov luarocks"
225luarocks_admin="run_lua luarocks-admin" 225luarocks_admin="run_lua luarocks-admin"
226luarocks_admin_nocov="run_lua --nocov luarocks-admin" 226luarocks_admin_nocov="run_lua --nocov luarocks-admin"
227luajit_luarocks="luajit -e require('luacov.runner')('$testing_dir/luacov.config') $basedir/bin/luarocks"
227 228
228################################################### 229###################################################
229 230
@@ -524,6 +525,13 @@ test_fetch_base_dir() { $lua <<EOF
524EOF 525EOF
525} 526}
526 527
528test_luajit_dependency() {
529 $luajit_luarocks build "$testing_dir/testfiles/luajit-success-1.0-1.rockspec"
530}
531fail_luajit_dependency() {
532 $luajit_luarocks build "$testing_dir/testfiles/luajit-fail-1.0-1.rockspec"
533}
534
527test_doc() { $luarocks install luarepl; $luarocks doc luarepl; } 535test_doc() { $luarocks install luarepl; $luarocks doc luarepl; }
528 536
529# Driver ######################################### 537# Driver #########################################