aboutsummaryrefslogtreecommitdiff
path: root/spec/fixtures
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-01-08 16:26:48 -0200
committerHisham Muhammad <hisham@gobolinux.org>2018-01-08 16:26:48 -0200
commitd80124af9cd929b395b4d4c353b51ccc902a3f9e (patch)
treea738a509039b286697819db762916cfda0384413 /spec/fixtures
parent98a0bd9a97190be8ba10f14a3d67e42de827b04a (diff)
downloadluarocks-d80124af9cd929b395b4d4c353b51ccc902a3f9e.tar.gz
luarocks-d80124af9cd929b395b4d4c353b51ccc902a3f9e.tar.bz2
luarocks-d80124af9cd929b395b4d4c353b51ccc902a3f9e.zip
Reorganize test suite files
Diffstat (limited to 'spec/fixtures')
-rw-r--r--spec/fixtures/a_rock-1.0-1.rockspec17
-rw-r--r--spec/fixtures/a_rock.lua1
-rw-r--r--spec/fixtures/invalid_patch-0.1-1.rockspec29
-rw-r--r--spec/fixtures/invalid_validate-args-1.5.4-1.rockspec35
-rw-r--r--spec/fixtures/luajit-fail-1.0-1.rockspec22
-rw-r--r--spec/fixtures/luajit-success-1.0-1.rockspec23
-rw-r--r--spec/fixtures/missing_external-0.1-1.rockspec24
-rw-r--r--spec/fixtures/mixed_deploy_type/mdt.c6
-rw-r--r--spec/fixtures/mixed_deploy_type/mdt.lua1
-rw-r--r--spec/fixtures/mixed_deploy_type/mdt_file1
-rw-r--r--spec/fixtures/mixed_deploy_type/mixed_deploy_type-0.1.0-1.rockspec21
-rw-r--r--spec/fixtures/mixed_deploy_type/mixed_deploy_type-0.2.0-1.rockspec21
-rw-r--r--spec/fixtures/no_build_table-0.1-1.rockspec12
-rw-r--r--spec/fixtures/not_a_zipfile-1.0-1.src.rock1
-rw-r--r--spec/fixtures/patch_create_delete-0.1-1.rockspec34
-rw-r--r--spec/fixtures/patch_create_delete/a_file.txt1
-rw-r--r--spec/fixtures/type_mismatch_string-1.0-1.rockspec4
-rw-r--r--spec/fixtures/type_mismatch_table-1.0-1.rockspec5
-rw-r--r--spec/fixtures/type_mismatch_version-1.0-1.rockspec4
-rw-r--r--spec/fixtures/with_external_dep-0.1-1.rockspec25
-rw-r--r--spec/fixtures/with_external_dep.c10
-rw-r--r--spec/fixtures/with_external_dep/foo/foo.h1
-rw-r--r--spec/fixtures/with_external_dep/foo/foo.h.gchbin0 -> 1503664 bytes
23 files changed, 298 insertions, 0 deletions
diff --git a/spec/fixtures/a_rock-1.0-1.rockspec b/spec/fixtures/a_rock-1.0-1.rockspec
new file mode 100644
index 00000000..9f15e87a
--- /dev/null
+++ b/spec/fixtures/a_rock-1.0-1.rockspec
@@ -0,0 +1,17 @@
1package = "a_rock"
2version = "1.0-1"
3source = {
4 url = "http://localhost:8080/file/a_rock.lua"
5}
6description = {
7 summary = "An example rockspec",
8}
9dependencies = {
10 "lua >= 5.1"
11}
12build = {
13 type = "builtin",
14 modules = {
15 build = "a_rock.lua"
16 },
17}
diff --git a/spec/fixtures/a_rock.lua b/spec/fixtures/a_rock.lua
new file mode 100644
index 00000000..a5647075
--- /dev/null
+++ b/spec/fixtures/a_rock.lua
@@ -0,0 +1 @@
return {}
diff --git a/spec/fixtures/invalid_patch-0.1-1.rockspec b/spec/fixtures/invalid_patch-0.1-1.rockspec
new file mode 100644
index 00000000..c2ecd160
--- /dev/null
+++ b/spec/fixtures/invalid_patch-0.1-1.rockspec
@@ -0,0 +1,29 @@
1package = "invalid_patch"
2version = "0.1-1"
3source = {
4 -- any valid URL
5 url = "https://raw.github.com/keplerproject/luarocks/master/src/luarocks/build.lua"
6}
7description = {
8 summary = "A rockspec with an invalid patch",
9}
10dependencies = {
11 "lua >= 5.1"
12}
13build = {
14 type = "builtin",
15 modules = {
16 build = "build.lua"
17 },
18 patches = {
19 ["I_am_an_invalid_patch.patch"] =
20[[
21diff -Naur luadoc-3.0.1/src/luadoc/doclet/html.lua luadoc-3.0.1-new/src/luadoc/doclet/html.lua
22--- luadoc-3.0.1/src/luadoc/doclet/html.lua2007-12-21 15:50:48.000000000 -0200
23+++ luadoc-3.0.1-new/src/luadoc/doclet/html.lua2008-02-28 01:59:53.000000000 -0300
24@@ -18,6 +18,7 @@
25- gabba gabba gabba
26+ gobo gobo gobo
27]]
28 }
29}
diff --git a/spec/fixtures/invalid_validate-args-1.5.4-1.rockspec b/spec/fixtures/invalid_validate-args-1.5.4-1.rockspec
new file mode 100644
index 00000000..0b4d807d
--- /dev/null
+++ b/spec/fixtures/invalid_validate-args-1.5.4-1.rockspec
@@ -0,0 +1,35 @@
1package = 'validate-args'
2version = '1.5.4-1'
3source = {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{++{
4 url = "https://bitbucket.org/djerius/validate.args/downloads/validate-args-1.5.4.tar.gz"
5}
6
7description = {
8 summary = "Function argument validation",
9 detailed = [[
10 validate.args is a Lua module that provides a framework for
11 validation of arguments to Lua functions as well as complex data
12 structures. The included validate.inplace module provides "live"
13 validation during assignment of values to elements in tables. ]],
14 license = "GPL-3",
15
16}
17
18dependencies = {
19 "lua >= 5.1"
20}
21
22build = {
23
24 type = "builtin",
25
26 modules = {
27 ["validate.args"] = "validate/args.lua",
28 ["validate.inplace"] = "validate/inplace.lua",
29 },
30
31 copy_directories = {
32 "doc", "tests"
33 }
34
35}
diff --git a/spec/fixtures/luajit-fail-1.0-1.rockspec b/spec/fixtures/luajit-fail-1.0-1.rockspec
new file mode 100644
index 00000000..f8204600
--- /dev/null
+++ b/spec/fixtures/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/spec/fixtures/luajit-success-1.0-1.rockspec b/spec/fixtures/luajit-success-1.0-1.rockspec
new file mode 100644
index 00000000..31c930c3
--- /dev/null
+++ b/spec/fixtures/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/spec/fixtures/missing_external-0.1-1.rockspec b/spec/fixtures/missing_external-0.1-1.rockspec
new file mode 100644
index 00000000..5f8e6219
--- /dev/null
+++ b/spec/fixtures/missing_external-0.1-1.rockspec
@@ -0,0 +1,24 @@
1package = "missing_external"
2version = "0.1-1"
3source = {
4 -- any valid URL
5 url = "https://raw.github.com/keplerproject/luarocks/master/src/luarocks/build.lua"
6}
7description = {
8 summary = "Missing external dependency",
9}
10external_dependencies = {
11 INEXISTENT = {
12 library = "inexistentlib*",
13 header = "inexistentheader*.h",
14 }
15}
16dependencies = {
17 "lua >= 5.1"
18}
19build = {
20 type = "builtin",
21 modules = {
22 build = "build.lua"
23 }
24}
diff --git a/spec/fixtures/mixed_deploy_type/mdt.c b/spec/fixtures/mixed_deploy_type/mdt.c
new file mode 100644
index 00000000..a162ce23
--- /dev/null
+++ b/spec/fixtures/mixed_deploy_type/mdt.c
@@ -0,0 +1,6 @@
1#include "lua.h"
2
3int luaopen_mdt(lua_State *L) {
4 lua_pushstring(L, "mdt.c");
5 return 1;
6}
diff --git a/spec/fixtures/mixed_deploy_type/mdt.lua b/spec/fixtures/mixed_deploy_type/mdt.lua
new file mode 100644
index 00000000..c9ca9c68
--- /dev/null
+++ b/spec/fixtures/mixed_deploy_type/mdt.lua
@@ -0,0 +1 @@
return "mdt.lua"
diff --git a/spec/fixtures/mixed_deploy_type/mdt_file b/spec/fixtures/mixed_deploy_type/mdt_file
new file mode 100644
index 00000000..1a15f7d7
--- /dev/null
+++ b/spec/fixtures/mixed_deploy_type/mdt_file
@@ -0,0 +1 @@
return "mdt_file"
diff --git a/spec/fixtures/mixed_deploy_type/mixed_deploy_type-0.1.0-1.rockspec b/spec/fixtures/mixed_deploy_type/mixed_deploy_type-0.1.0-1.rockspec
new file mode 100644
index 00000000..91b725da
--- /dev/null
+++ b/spec/fixtures/mixed_deploy_type/mixed_deploy_type-0.1.0-1.rockspec
@@ -0,0 +1,21 @@
1package = "mixed_deploy_type"
2version = "0.1.0-1"
3source = {
4 url = "http://example.com"
5}
6description = {
7 homepage = "http://example.com",
8 license = "*** please specify a license ***"
9}
10dependencies = {}
11build = {
12 type = "builtin",
13 modules = {
14 mdt = "mdt/mdt.lua"
15 },
16 install = {
17 lua = {
18 mdt_file = "mdt/mdt_file"
19 }
20 }
21}
diff --git a/spec/fixtures/mixed_deploy_type/mixed_deploy_type-0.2.0-1.rockspec b/spec/fixtures/mixed_deploy_type/mixed_deploy_type-0.2.0-1.rockspec
new file mode 100644
index 00000000..9ca03180
--- /dev/null
+++ b/spec/fixtures/mixed_deploy_type/mixed_deploy_type-0.2.0-1.rockspec
@@ -0,0 +1,21 @@
1package = "mixed_deploy_type"
2version = "0.2.0-1"
3source = {
4 url = "http://example.com"
5}
6description = {
7 homepage = "http://example.com",
8 license = "*** please specify a license ***"
9}
10dependencies = {}
11build = {
12 type = "builtin",
13 modules = {
14 mdt = "mdt/mdt.c"
15 },
16 install = {
17 lib = {
18 mdt_file = "mdt/mdt_file"
19 }
20 }
21}
diff --git a/spec/fixtures/no_build_table-0.1-1.rockspec b/spec/fixtures/no_build_table-0.1-1.rockspec
new file mode 100644
index 00000000..5d79e9a0
--- /dev/null
+++ b/spec/fixtures/no_build_table-0.1-1.rockspec
@@ -0,0 +1,12 @@
1package = "no_build_table"
2version = "0.1-1"
3source = {
4 -- any valid URL
5 url = "https://raw.github.com/keplerproject/luarocks/master/src/luarocks/build.lua"
6}
7description = {
8 summary = "A rockspec with no build field",
9}
10dependencies = {
11 "lua >= 5.1"
12}
diff --git a/spec/fixtures/not_a_zipfile-1.0-1.src.rock b/spec/fixtures/not_a_zipfile-1.0-1.src.rock
new file mode 100644
index 00000000..e36f8bbe
--- /dev/null
+++ b/spec/fixtures/not_a_zipfile-1.0-1.src.rock
@@ -0,0 +1 @@
I am not a .zip file!
diff --git a/spec/fixtures/patch_create_delete-0.1-1.rockspec b/spec/fixtures/patch_create_delete-0.1-1.rockspec
new file mode 100644
index 00000000..3d55da58
--- /dev/null
+++ b/spec/fixtures/patch_create_delete-0.1-1.rockspec
@@ -0,0 +1,34 @@
1rockspec_format = "3.0"
2package = "patch_create_delete"
3version = "0.1-1"
4source = {
5 -- any valid URL
6 url = "git://github.com/luarocks/luarocks"
7}
8description = {
9 summary = "A rockspec with a patch that creates and deletes files",
10}
11dependencies = {
12 "lua >= 5.1"
13}
14build = {
15 type = "builtin",
16 modules = {
17 ["luarocks.loader"] = "src/luarocks/loader.lua"
18 },
19 patches = {
20 ["create_delete.patch"] =
21[[
22diff -Naur luarocks/spec/fixtures/patch_create_delete/a_file.txt luarocks-patch/spec/fixtures/patch_create_delete/a_file.txt
23--- luarocks/spec/fixtures/patch_create_delete/a_file.txt 2017-10-04 15:39:44.179306674 -0300
24+++ luarocks-patch/spec/fixtures/patch_create_delete/a_file.txt 1969-12-31 21:00:00.000000000 -0300
25@@ -1 +0,0 @@
26-I am a file.
27diff -Naur luarocks/spec/fixtures/patch_create_delete/another_file.txt luarocks-patch/spec/fixtures/patch_create_delete/another_file.txt
28--- luarocks/spec/fixtures/patch_create_delete/another_file.txt 1969-12-31 21:00:00.000000000 -0300
29+++ luarocks-patch/spec/fixtures/patch_create_delete/another_file.txt 2017-10-04 15:40:12.836306564 -0300
30@@ -0,0 +1 @@
31+I am another file.
32]]
33 }
34}
diff --git a/spec/fixtures/patch_create_delete/a_file.txt b/spec/fixtures/patch_create_delete/a_file.txt
new file mode 100644
index 00000000..6539c24e
--- /dev/null
+++ b/spec/fixtures/patch_create_delete/a_file.txt
@@ -0,0 +1 @@
I am a file.
diff --git a/spec/fixtures/type_mismatch_string-1.0-1.rockspec b/spec/fixtures/type_mismatch_string-1.0-1.rockspec
new file mode 100644
index 00000000..7a607cfd
--- /dev/null
+++ b/spec/fixtures/type_mismatch_string-1.0-1.rockspec
@@ -0,0 +1,4 @@
1
2package="type_mismatch_version"
3version=1.0
4
diff --git a/spec/fixtures/type_mismatch_table-1.0-1.rockspec b/spec/fixtures/type_mismatch_table-1.0-1.rockspec
new file mode 100644
index 00000000..f348b798
--- /dev/null
+++ b/spec/fixtures/type_mismatch_table-1.0-1.rockspec
@@ -0,0 +1,5 @@
1
2package="type_mismatch_table"
3version="1.0-1"
4
5source = "not a table"
diff --git a/spec/fixtures/type_mismatch_version-1.0-1.rockspec b/spec/fixtures/type_mismatch_version-1.0-1.rockspec
new file mode 100644
index 00000000..5e30dae6
--- /dev/null
+++ b/spec/fixtures/type_mismatch_version-1.0-1.rockspec
@@ -0,0 +1,4 @@
1
2package="type_mismatch_version"
3version="1.0"
4
diff --git a/spec/fixtures/with_external_dep-0.1-1.rockspec b/spec/fixtures/with_external_dep-0.1-1.rockspec
new file mode 100644
index 00000000..45fea4bd
--- /dev/null
+++ b/spec/fixtures/with_external_dep-0.1-1.rockspec
@@ -0,0 +1,25 @@
1package = "with_external_dep"
2version = "0.1-1"
3source = {
4 url = "http://localhost:8080/file/with_external_dep.c"
5}
6description = {
7 summary = "An example rockspec",
8}
9external_dependencies = {
10 FOO = {
11 header = "foo/foo.h"
12 }
13}
14dependencies = {
15 "lua >= 5.1"
16}
17build = {
18 type = "builtin",
19 modules = {
20 with_external_dep = {
21 sources = "with_external_dep.c",
22 incdirs = "$(FOO_INCDIR)",
23 }
24 }
25}
diff --git a/spec/fixtures/with_external_dep.c b/spec/fixtures/with_external_dep.c
new file mode 100644
index 00000000..16435d8f
--- /dev/null
+++ b/spec/fixtures/with_external_dep.c
@@ -0,0 +1,10 @@
1#include <foo/foo.h>
2#include <lua.h>
3#include <lauxlib.h>
4
5int luaopen_with_external_dep(lua_State* L) {
6 lua_newtable(L);
7 lua_pushinteger(L, FOO);
8 lua_setfield(L, -2, "foo");
9 return 1;
10}
diff --git a/spec/fixtures/with_external_dep/foo/foo.h b/spec/fixtures/with_external_dep/foo/foo.h
new file mode 100644
index 00000000..eedd558f
--- /dev/null
+++ b/spec/fixtures/with_external_dep/foo/foo.h
@@ -0,0 +1 @@
#define FOO 42
diff --git a/spec/fixtures/with_external_dep/foo/foo.h.gch b/spec/fixtures/with_external_dep/foo/foo.h.gch
new file mode 100644
index 00000000..66165c9e
--- /dev/null
+++ b/spec/fixtures/with_external_dep/foo/foo.h.gch
Binary files differ