summaryrefslogtreecommitdiff
path: root/spec/fixtures
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2025-02-03 21:29:42 +0100
committerMike Vink <mike@pionative.com>2025-02-03 21:29:42 +0100
commit5155816b7b925dec5d5feb1568b1d7ceb00938b9 (patch)
treedeca28ea15e79f6f804c3d90d2ba757881638af5 /spec/fixtures
fetch tarballHEADmaster
Diffstat (limited to 'spec/fixtures')
-rw-r--r--spec/fixtures/a_repo/a_build_dep-1.0-1.rockspec18
-rw-r--r--spec/fixtures/a_repo/a_build_dep-1.0-1.src.rockbin0 -> 575 bytes
-rw-r--r--spec/fixtures/a_repo/a_rock-1.0-1.rockspec18
-rw-r--r--spec/fixtures/a_repo/a_rock-1.0-1.src.rockbin0 -> 446 bytes
-rw-r--r--spec/fixtures/a_repo/a_rock-2.0-1.src.rockbin0 -> 541 bytes
-rw-r--r--spec/fixtures/a_repo/busted_project-0.1-1.rockspec19
-rw-r--r--spec/fixtures/a_repo/busted_project-0.1-1.src.rockbin0 -> 937 bytes
-rw-r--r--spec/fixtures/a_repo/has_another_namespaced_dep-1.0-1.rockspec19
-rw-r--r--spec/fixtures/a_repo/has_another_namespaced_dep-1.0-1.src.rockbin0 -> 603 bytes
-rw-r--r--spec/fixtures/a_repo/has_build_dep-1.0-1.all.rockbin0 -> 1010 bytes
-rw-r--r--spec/fixtures/a_repo/has_build_dep-1.0-1.rockspec22
-rw-r--r--spec/fixtures/a_repo/has_build_dep-1.0-1.src.rockbin0 -> 584 bytes
-rw-r--r--spec/fixtures/a_repo/has_namespaced_dep-1.0-1.rockspec19
-rw-r--r--spec/fixtures/a_repo/has_namespaced_dep-1.0-1.src.rockbin0 -> 580 bytes
-rw-r--r--spec/fixtures/a_repo/manifest90
-rw-r--r--spec/fixtures/a_repo/manifest-5.190
-rw-r--r--spec/fixtures/a_repo/manifest-5.1.zipbin0 -> 343 bytes
-rw-r--r--spec/fixtures/a_repo/manifest-5.290
-rw-r--r--spec/fixtures/a_repo/manifest-5.2.zipbin0 -> 343 bytes
-rw-r--r--spec/fixtures/a_repo/manifest-5.390
-rw-r--r--spec/fixtures/a_repo/manifest-5.3.zipbin0 -> 343 bytes
-rw-r--r--spec/fixtures/a_repo/manifest-5.490
-rw-r--r--spec/fixtures/a_repo/manifest-5.4.zipbin0 -> 343 bytes
-rw-r--r--spec/fixtures/a_repo/manifests/a_user/a_rock-2.0-1.rockspec17
-rw-r--r--spec/fixtures/a_repo/manifests/a_user/a_rock-2.0-1.src.rockbin0 -> 446 bytes
-rw-r--r--spec/fixtures/a_repo/manifests/a_user/manifest14
-rw-r--r--spec/fixtures/a_repo/manifests/a_user/manifest-5.114
-rw-r--r--spec/fixtures/a_repo/manifests/a_user/manifest-5.214
-rw-r--r--spec/fixtures/a_repo/manifests/a_user/manifest-5.314
-rw-r--r--spec/fixtures/a_repo/manifests/a_user/manifest-5.414
-rw-r--r--spec/fixtures/a_repo/manifests/another_user/a_rock-3.0-1.rockspec17
-rw-r--r--spec/fixtures/a_repo/manifests/another_user/a_rock-3.0-1.src.rockbin0 -> 449 bytes
-rw-r--r--spec/fixtures/a_repo/manifests/another_user/manifest14
-rw-r--r--spec/fixtures/a_repo/manifests/another_user/manifest-5.114
-rw-r--r--spec/fixtures/a_repo/manifests/another_user/manifest-5.214
-rw-r--r--spec/fixtures/a_repo/manifests/another_user/manifest-5.314
-rw-r--r--spec/fixtures/a_repo/manifests/another_user/manifest-5.414
-rw-r--r--spec/fixtures/a_repo/non_lua_file-1.0-1.rockspec22
-rw-r--r--spec/fixtures/a_repo/non_lua_file-1.0-1.src.rockbin0 -> 852 bytes
-rw-r--r--spec/fixtures/a_repo/non_lua_file-1.0-2.rockspec22
-rw-r--r--spec/fixtures/a_repo/non_lua_file-1.0-2.src.rockbin0 -> 852 bytes
-rw-r--r--spec/fixtures/a_rock-1.0-1.rockspec17
-rw-r--r--spec/fixtures/a_rock-1.0-1.src.rockbin0 -> 446 bytes
-rw-r--r--spec/fixtures/a_rock.lua1
-rw-r--r--spec/fixtures/abc.bz2bin0 -> 66 bytes
-rw-r--r--spec/fixtures/an_upstream_tarball-0.1.tar.gzbin0 -> 260 bytes
-rw-r--r--spec/fixtures/bad_pack-0.1-1.rockspec19
-rw-r--r--spec/fixtures/build_only_deps-0.1-1.rockspec18
-rw-r--r--spec/fixtures/build_only_deps-0.1-1.src.rockbin0 -> 547 bytes
-rw-r--r--spec/fixtures/busted_project-0.1-1.rockspec19
-rw-r--r--spec/fixtures/busted_project-0.1.tar.gzbin0 -> 345 bytes
-rw-r--r--spec/fixtures/busted_project/spec/sum_spec.lua10
-rw-r--r--spec/fixtures/busted_project/sum.lua7
-rw-r--r--spec/fixtures/double_deploy_type/ddt.c6
-rw-r--r--spec/fixtures/double_deploy_type/ddt1.lua1
-rw-r--r--spec/fixtures/double_deploy_type/ddt2.lua1
-rw-r--r--spec/fixtures/double_deploy_type/ddt_file1
-rw-r--r--spec/fixtures/double_deploy_type/double_deploy_type-0.1.0-1.rockspec22
-rw-r--r--spec/fixtures/double_deploy_type/double_deploy_type-0.2.0-1.rockspec22
-rw-r--r--spec/fixtures/fixturedep.c4
-rw-r--r--spec/fixtures/git_repo/LICENSE19
-rw-r--r--spec/fixtures/git_repo/README.md3
-rw-r--r--spec/fixtures/gpg/private-keys-v1.d/5D2D3F97B88B18604D819EA9DF5B730C75D71B60.keybin0 -> 977 bytes
-rw-r--r--spec/fixtures/gpg/private-keys-v1.d/B71C36B4EDEB72A047FED1C01BCFF4D08837E3B1.keybin0 -> 978 bytes
-rw-r--r--spec/fixtures/gpg/pubring.kbxbin0 -> 1494 bytes
-rw-r--r--spec/fixtures/gpg/trustdb.gpgbin0 -> 1240 bytes
-rw-r--r--spec/fixtures/invalid_patch-0.1-1.rockspec29
-rw-r--r--spec/fixtures/invalid_say-1.3-1.rockspec23
-rw-r--r--spec/fixtures/legacyexternalcommand-0.1-1.rockspec17
-rw-r--r--spec/fixtures/legacyexternalcommand.lua34
-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/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/patch_create_delete-0.1-1.rockspec34
-rw-r--r--spec/fixtures/patch_create_delete/a_file.txt1
-rw-r--r--spec/fixtures/renamed_upstream_tarball-0.1.tar.gzbin0 -> 260 bytes
-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
83 files changed, 1222 insertions, 0 deletions
diff --git a/spec/fixtures/a_repo/a_build_dep-1.0-1.rockspec b/spec/fixtures/a_repo/a_build_dep-1.0-1.rockspec
new file mode 100644
index 0000000..2398d3d
--- /dev/null
+++ b/spec/fixtures/a_repo/a_build_dep-1.0-1.rockspec
@@ -0,0 +1,18 @@
+rockspec_format = "3.0"
+package = "a_build_dep"
+version = "1.0-1"
+source = {
+ url = "http://localhost:8080/file/a_rock.lua"
+}
+description = {
+ summary = "An example rockspec that is a build dependency for has_build_dep.",
+}
+dependencies = {
+ "lua >= 5.1",
+}
+build = {
+ type = "builtin",
+ modules = {
+ build_dep = "a_rock.lua"
+ },
+}
diff --git a/spec/fixtures/a_repo/a_build_dep-1.0-1.src.rock b/spec/fixtures/a_repo/a_build_dep-1.0-1.src.rock
new file mode 100644
index 0000000..c56ee34
--- /dev/null
+++ b/spec/fixtures/a_repo/a_build_dep-1.0-1.src.rock
Binary files differ
diff --git a/spec/fixtures/a_repo/a_rock-1.0-1.rockspec b/spec/fixtures/a_repo/a_rock-1.0-1.rockspec
new file mode 100644
index 0000000..69d7820
--- /dev/null
+++ b/spec/fixtures/a_repo/a_rock-1.0-1.rockspec
@@ -0,0 +1,18 @@
+package = "a_rock"
+version = "1.0-1"
+source = {
+ url = "http://localhost:8080/file/a_rock.lua"
+}
+description = {
+ summary = "An example rockspec",
+ homepage = "http://www.example.com"
+}
+dependencies = {
+ "lua >= 5.1"
+}
+build = {
+ type = "builtin",
+ modules = {
+ build = "a_rock.lua"
+ },
+}
diff --git a/spec/fixtures/a_repo/a_rock-1.0-1.src.rock b/spec/fixtures/a_repo/a_rock-1.0-1.src.rock
new file mode 100644
index 0000000..9d0bb45
--- /dev/null
+++ b/spec/fixtures/a_repo/a_rock-1.0-1.src.rock
Binary files differ
diff --git a/spec/fixtures/a_repo/a_rock-2.0-1.src.rock b/spec/fixtures/a_repo/a_rock-2.0-1.src.rock
new file mode 100644
index 0000000..5824c76
--- /dev/null
+++ b/spec/fixtures/a_repo/a_rock-2.0-1.src.rock
Binary files differ
diff --git a/spec/fixtures/a_repo/busted_project-0.1-1.rockspec b/spec/fixtures/a_repo/busted_project-0.1-1.rockspec
new file mode 100644
index 0000000..54ed28a
--- /dev/null
+++ b/spec/fixtures/a_repo/busted_project-0.1-1.rockspec
@@ -0,0 +1,19 @@
+rockspec_format = "3.0"
+package = "busted_project"
+version = "0.1-1"
+source = {
+ url = "http://localhost:8080/file/busted_project-0.1.tar.gz",
+ dir = "busted_project",
+}
+description = {
+ summary = "A project that uses Busted tests",
+}
+build = {
+ type = "builtin",
+ modules = {
+ sum = "sum.lua",
+ }
+}
+test = {
+ type = "busted",
+}
diff --git a/spec/fixtures/a_repo/busted_project-0.1-1.src.rock b/spec/fixtures/a_repo/busted_project-0.1-1.src.rock
new file mode 100644
index 0000000..db92411
--- /dev/null
+++ b/spec/fixtures/a_repo/busted_project-0.1-1.src.rock
Binary files differ
diff --git a/spec/fixtures/a_repo/has_another_namespaced_dep-1.0-1.rockspec b/spec/fixtures/a_repo/has_another_namespaced_dep-1.0-1.rockspec
new file mode 100644
index 0000000..04cb06c
--- /dev/null
+++ b/spec/fixtures/a_repo/has_another_namespaced_dep-1.0-1.rockspec
@@ -0,0 +1,19 @@
+rockspec_format = "3.0"
+package = "has_another_namespaced_dep"
+version = "1.0-1"
+source = {
+ url = "http://localhost:8080/file/a_rock.lua"
+}
+description = {
+ summary = "An example rockspec",
+}
+dependencies = {
+ "another_user/a_rock",
+ "lua >= 5.1",
+}
+build = {
+ type = "builtin",
+ modules = {
+ bla = "a_rock.lua"
+ },
+}
diff --git a/spec/fixtures/a_repo/has_another_namespaced_dep-1.0-1.src.rock b/spec/fixtures/a_repo/has_another_namespaced_dep-1.0-1.src.rock
new file mode 100644
index 0000000..4bbbf1a
--- /dev/null
+++ b/spec/fixtures/a_repo/has_another_namespaced_dep-1.0-1.src.rock
Binary files differ
diff --git a/spec/fixtures/a_repo/has_build_dep-1.0-1.all.rock b/spec/fixtures/a_repo/has_build_dep-1.0-1.all.rock
new file mode 100644
index 0000000..a2d09ab
--- /dev/null
+++ b/spec/fixtures/a_repo/has_build_dep-1.0-1.all.rock
Binary files differ
diff --git a/spec/fixtures/a_repo/has_build_dep-1.0-1.rockspec b/spec/fixtures/a_repo/has_build_dep-1.0-1.rockspec
new file mode 100644
index 0000000..417473a
--- /dev/null
+++ b/spec/fixtures/a_repo/has_build_dep-1.0-1.rockspec
@@ -0,0 +1,22 @@
+rockspec_format = "3.0"
+package = "has_build_dep"
+version = "1.0-1"
+source = {
+ url = "http://localhost:8080/file/a_rock.lua"
+}
+description = {
+ summary = "An example rockspec that has build dependencies.",
+}
+dependencies = {
+ "a_rock",
+ "lua >= 5.1",
+}
+build_dependencies = {
+ "a_build_dep",
+}
+build = {
+ type = "builtin",
+ modules = {
+ bla = "a_rock.lua"
+ },
+}
diff --git a/spec/fixtures/a_repo/has_build_dep-1.0-1.src.rock b/spec/fixtures/a_repo/has_build_dep-1.0-1.src.rock
new file mode 100644
index 0000000..fc4e11b
--- /dev/null
+++ b/spec/fixtures/a_repo/has_build_dep-1.0-1.src.rock
Binary files differ
diff --git a/spec/fixtures/a_repo/has_namespaced_dep-1.0-1.rockspec b/spec/fixtures/a_repo/has_namespaced_dep-1.0-1.rockspec
new file mode 100644
index 0000000..6152c78
--- /dev/null
+++ b/spec/fixtures/a_repo/has_namespaced_dep-1.0-1.rockspec
@@ -0,0 +1,19 @@
+rockspec_format = "3.0"
+package = "has_namespaced_dep"
+version = "1.0-1"
+source = {
+ url = "http://localhost:8080/file/a_rock.lua"
+}
+description = {
+ summary = "An example rockspec",
+}
+dependencies = {
+ "a_user/a_rock",
+ "lua >= 5.1",
+}
+build = {
+ type = "builtin",
+ modules = {
+ bla = "a_rock.lua"
+ },
+}
diff --git a/spec/fixtures/a_repo/has_namespaced_dep-1.0-1.src.rock b/spec/fixtures/a_repo/has_namespaced_dep-1.0-1.src.rock
new file mode 100644
index 0000000..c4d5f94
--- /dev/null
+++ b/spec/fixtures/a_repo/has_namespaced_dep-1.0-1.src.rock
Binary files differ
diff --git a/spec/fixtures/a_repo/manifest b/spec/fixtures/a_repo/manifest
new file mode 100644
index 0000000..a5f770a
--- /dev/null
+++ b/spec/fixtures/a_repo/manifest
@@ -0,0 +1,90 @@
+commands = {}
+modules = {}
+repository = {
+ a_build_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ },
+ a_rock = {
+ ["1.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ },
+ ["2.0-1"] = {
+ {
+ arch = "src"
+ }
+ }
+ },
+ busted_project = {
+ ["0.1-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ },
+ has_another_namespaced_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ },
+ has_build_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ },
+ {
+ arch = "all"
+ }
+ }
+ },
+ has_namespaced_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ },
+ non_lua_file = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ },
+ ["1.0-2"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifest-5.1 b/spec/fixtures/a_repo/manifest-5.1
new file mode 100644
index 0000000..a5f770a
--- /dev/null
+++ b/spec/fixtures/a_repo/manifest-5.1
@@ -0,0 +1,90 @@
+commands = {}
+modules = {}
+repository = {
+ a_build_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ },
+ a_rock = {
+ ["1.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ },
+ ["2.0-1"] = {
+ {
+ arch = "src"
+ }
+ }
+ },
+ busted_project = {
+ ["0.1-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ },
+ has_another_namespaced_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ },
+ has_build_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ },
+ {
+ arch = "all"
+ }
+ }
+ },
+ has_namespaced_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ },
+ non_lua_file = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ },
+ ["1.0-2"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifest-5.1.zip b/spec/fixtures/a_repo/manifest-5.1.zip
new file mode 100644
index 0000000..e63d6f1
--- /dev/null
+++ b/spec/fixtures/a_repo/manifest-5.1.zip
Binary files differ
diff --git a/spec/fixtures/a_repo/manifest-5.2 b/spec/fixtures/a_repo/manifest-5.2
new file mode 100644
index 0000000..a5f770a
--- /dev/null
+++ b/spec/fixtures/a_repo/manifest-5.2
@@ -0,0 +1,90 @@
+commands = {}
+modules = {}
+repository = {
+ a_build_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ },
+ a_rock = {
+ ["1.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ },
+ ["2.0-1"] = {
+ {
+ arch = "src"
+ }
+ }
+ },
+ busted_project = {
+ ["0.1-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ },
+ has_another_namespaced_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ },
+ has_build_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ },
+ {
+ arch = "all"
+ }
+ }
+ },
+ has_namespaced_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ },
+ non_lua_file = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ },
+ ["1.0-2"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifest-5.2.zip b/spec/fixtures/a_repo/manifest-5.2.zip
new file mode 100644
index 0000000..cec28c0
--- /dev/null
+++ b/spec/fixtures/a_repo/manifest-5.2.zip
Binary files differ
diff --git a/spec/fixtures/a_repo/manifest-5.3 b/spec/fixtures/a_repo/manifest-5.3
new file mode 100644
index 0000000..a5f770a
--- /dev/null
+++ b/spec/fixtures/a_repo/manifest-5.3
@@ -0,0 +1,90 @@
+commands = {}
+modules = {}
+repository = {
+ a_build_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ },
+ a_rock = {
+ ["1.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ },
+ ["2.0-1"] = {
+ {
+ arch = "src"
+ }
+ }
+ },
+ busted_project = {
+ ["0.1-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ },
+ has_another_namespaced_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ },
+ has_build_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ },
+ {
+ arch = "all"
+ }
+ }
+ },
+ has_namespaced_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ },
+ non_lua_file = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ },
+ ["1.0-2"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifest-5.3.zip b/spec/fixtures/a_repo/manifest-5.3.zip
new file mode 100644
index 0000000..23df5c3
--- /dev/null
+++ b/spec/fixtures/a_repo/manifest-5.3.zip
Binary files differ
diff --git a/spec/fixtures/a_repo/manifest-5.4 b/spec/fixtures/a_repo/manifest-5.4
new file mode 100644
index 0000000..a5f770a
--- /dev/null
+++ b/spec/fixtures/a_repo/manifest-5.4
@@ -0,0 +1,90 @@
+commands = {}
+modules = {}
+repository = {
+ a_build_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ },
+ a_rock = {
+ ["1.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ },
+ ["2.0-1"] = {
+ {
+ arch = "src"
+ }
+ }
+ },
+ busted_project = {
+ ["0.1-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ },
+ has_another_namespaced_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ },
+ has_build_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ },
+ {
+ arch = "all"
+ }
+ }
+ },
+ has_namespaced_dep = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ },
+ non_lua_file = {
+ ["1.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ },
+ ["1.0-2"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifest-5.4.zip b/spec/fixtures/a_repo/manifest-5.4.zip
new file mode 100644
index 0000000..14b5621
--- /dev/null
+++ b/spec/fixtures/a_repo/manifest-5.4.zip
Binary files differ
diff --git a/spec/fixtures/a_repo/manifests/a_user/a_rock-2.0-1.rockspec b/spec/fixtures/a_repo/manifests/a_user/a_rock-2.0-1.rockspec
new file mode 100644
index 0000000..da5a9a1
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/a_user/a_rock-2.0-1.rockspec
@@ -0,0 +1,17 @@
+package = "a_rock"
+version = "2.0-1"
+source = {
+ url = "http://localhost:8080/file/a_rock.lua"
+}
+description = {
+ summary = "An example rockspec",
+}
+dependencies = {
+ "lua >= 5.1"
+}
+build = {
+ type = "builtin",
+ modules = {
+ build = "a_rock.lua"
+ },
+}
diff --git a/spec/fixtures/a_repo/manifests/a_user/a_rock-2.0-1.src.rock b/spec/fixtures/a_repo/manifests/a_user/a_rock-2.0-1.src.rock
new file mode 100644
index 0000000..8d10fac
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/a_user/a_rock-2.0-1.src.rock
Binary files differ
diff --git a/spec/fixtures/a_repo/manifests/a_user/manifest b/spec/fixtures/a_repo/manifests/a_user/manifest
new file mode 100644
index 0000000..74b0c61
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/a_user/manifest
@@ -0,0 +1,14 @@
+commands = {}
+modules = {}
+repository = {
+ a_rock = {
+ ["2.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifests/a_user/manifest-5.1 b/spec/fixtures/a_repo/manifests/a_user/manifest-5.1
new file mode 100644
index 0000000..74b0c61
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/a_user/manifest-5.1
@@ -0,0 +1,14 @@
+commands = {}
+modules = {}
+repository = {
+ a_rock = {
+ ["2.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifests/a_user/manifest-5.2 b/spec/fixtures/a_repo/manifests/a_user/manifest-5.2
new file mode 100644
index 0000000..74b0c61
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/a_user/manifest-5.2
@@ -0,0 +1,14 @@
+commands = {}
+modules = {}
+repository = {
+ a_rock = {
+ ["2.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifests/a_user/manifest-5.3 b/spec/fixtures/a_repo/manifests/a_user/manifest-5.3
new file mode 100644
index 0000000..74b0c61
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/a_user/manifest-5.3
@@ -0,0 +1,14 @@
+commands = {}
+modules = {}
+repository = {
+ a_rock = {
+ ["2.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifests/a_user/manifest-5.4 b/spec/fixtures/a_repo/manifests/a_user/manifest-5.4
new file mode 100644
index 0000000..74b0c61
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/a_user/manifest-5.4
@@ -0,0 +1,14 @@
+commands = {}
+modules = {}
+repository = {
+ a_rock = {
+ ["2.0-1"] = {
+ {
+ arch = "rockspec"
+ },
+ {
+ arch = "src"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifests/another_user/a_rock-3.0-1.rockspec b/spec/fixtures/a_repo/manifests/another_user/a_rock-3.0-1.rockspec
new file mode 100644
index 0000000..628c5a4
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/another_user/a_rock-3.0-1.rockspec
@@ -0,0 +1,17 @@
+package = "a_rock"
+version = "3.0-1"
+source = {
+ url = "http://localhost:8080/file/a_rock.lua"
+}
+description = {
+ summary = "An example rockspec",
+}
+dependencies = {
+ "lua >= 5.1"
+}
+build = {
+ type = "builtin",
+ modules = {
+ a_rock = "a_rock.lua"
+ },
+}
diff --git a/spec/fixtures/a_repo/manifests/another_user/a_rock-3.0-1.src.rock b/spec/fixtures/a_repo/manifests/another_user/a_rock-3.0-1.src.rock
new file mode 100644
index 0000000..4c20afc
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/another_user/a_rock-3.0-1.src.rock
Binary files differ
diff --git a/spec/fixtures/a_repo/manifests/another_user/manifest b/spec/fixtures/a_repo/manifests/another_user/manifest
new file mode 100644
index 0000000..185aed0
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/another_user/manifest
@@ -0,0 +1,14 @@
+commands = {}
+modules = {}
+repository = {
+ a_rock = {
+ ["3.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifests/another_user/manifest-5.1 b/spec/fixtures/a_repo/manifests/another_user/manifest-5.1
new file mode 100644
index 0000000..185aed0
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/another_user/manifest-5.1
@@ -0,0 +1,14 @@
+commands = {}
+modules = {}
+repository = {
+ a_rock = {
+ ["3.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifests/another_user/manifest-5.2 b/spec/fixtures/a_repo/manifests/another_user/manifest-5.2
new file mode 100644
index 0000000..185aed0
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/another_user/manifest-5.2
@@ -0,0 +1,14 @@
+commands = {}
+modules = {}
+repository = {
+ a_rock = {
+ ["3.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifests/another_user/manifest-5.3 b/spec/fixtures/a_repo/manifests/another_user/manifest-5.3
new file mode 100644
index 0000000..185aed0
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/another_user/manifest-5.3
@@ -0,0 +1,14 @@
+commands = {}
+modules = {}
+repository = {
+ a_rock = {
+ ["3.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/manifests/another_user/manifest-5.4 b/spec/fixtures/a_repo/manifests/another_user/manifest-5.4
new file mode 100644
index 0000000..185aed0
--- /dev/null
+++ b/spec/fixtures/a_repo/manifests/another_user/manifest-5.4
@@ -0,0 +1,14 @@
+commands = {}
+modules = {}
+repository = {
+ a_rock = {
+ ["3.0-1"] = {
+ {
+ arch = "src"
+ },
+ {
+ arch = "rockspec"
+ }
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/non_lua_file-1.0-1.rockspec b/spec/fixtures/a_repo/non_lua_file-1.0-1.rockspec
new file mode 100644
index 0000000..51ef42e
--- /dev/null
+++ b/spec/fixtures/a_repo/non_lua_file-1.0-1.rockspec
@@ -0,0 +1,22 @@
+-- regression test for sailorproject/sailor#138
+rockspec_format = "3.0"
+package = "non_lua_file"
+version = "1.0-1"
+source = {
+ url = "file://../upstream/non_lua_file-1.0.tar.gz"
+}
+description = {
+ summary = "An example rockspec that has a script.",
+}
+dependencies = {
+ "lua >= 5.1",
+}
+build = {
+ type = "builtin",
+ modules = {},
+ install = {
+ lua = {
+ ["sailor.blank-app.htaccess"] = "src/sailor/blank-app/.htaccess",
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/non_lua_file-1.0-1.src.rock b/spec/fixtures/a_repo/non_lua_file-1.0-1.src.rock
new file mode 100644
index 0000000..148f703
--- /dev/null
+++ b/spec/fixtures/a_repo/non_lua_file-1.0-1.src.rock
Binary files differ
diff --git a/spec/fixtures/a_repo/non_lua_file-1.0-2.rockspec b/spec/fixtures/a_repo/non_lua_file-1.0-2.rockspec
new file mode 100644
index 0000000..f9d2e2c
--- /dev/null
+++ b/spec/fixtures/a_repo/non_lua_file-1.0-2.rockspec
@@ -0,0 +1,22 @@
+-- regression test for sailorproject/sailor#138
+rockspec_format = "3.0"
+package = "non_lua_file"
+version = "1.0-2"
+source = {
+ url = "file://../upstream/non_lua_file-1.0.tar.gz"
+}
+description = {
+ summary = "An example rockspec that has a script.",
+}
+dependencies = {
+ "lua >= 5.1",
+}
+build = {
+ type = "builtin",
+ modules = {},
+ install = {
+ lua = {
+ ["sailor.blank-app.htaccess"] = "src/sailor/blank-app/.htaccess",
+ }
+ }
+}
diff --git a/spec/fixtures/a_repo/non_lua_file-1.0-2.src.rock b/spec/fixtures/a_repo/non_lua_file-1.0-2.src.rock
new file mode 100644
index 0000000..06eb9ac
--- /dev/null
+++ b/spec/fixtures/a_repo/non_lua_file-1.0-2.src.rock
Binary files differ
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 0000000..9f15e87
--- /dev/null
+++ b/spec/fixtures/a_rock-1.0-1.rockspec
@@ -0,0 +1,17 @@
+package = "a_rock"
+version = "1.0-1"
+source = {
+ url = "http://localhost:8080/file/a_rock.lua"
+}
+description = {
+ summary = "An example rockspec",
+}
+dependencies = {
+ "lua >= 5.1"
+}
+build = {
+ type = "builtin",
+ modules = {
+ build = "a_rock.lua"
+ },
+}
diff --git a/spec/fixtures/a_rock-1.0-1.src.rock b/spec/fixtures/a_rock-1.0-1.src.rock
new file mode 100644
index 0000000..9d0bb45
--- /dev/null
+++ b/spec/fixtures/a_rock-1.0-1.src.rock
Binary files differ
diff --git a/spec/fixtures/a_rock.lua b/spec/fixtures/a_rock.lua
new file mode 100644
index 0000000..a564707
--- /dev/null
+++ b/spec/fixtures/a_rock.lua
@@ -0,0 +1 @@
+return {}
diff --git a/spec/fixtures/abc.bz2 b/spec/fixtures/abc.bz2
new file mode 100644
index 0000000..ee78671
--- /dev/null
+++ b/spec/fixtures/abc.bz2
Binary files differ
diff --git a/spec/fixtures/an_upstream_tarball-0.1.tar.gz b/spec/fixtures/an_upstream_tarball-0.1.tar.gz
new file mode 100644
index 0000000..518c8cb
--- /dev/null
+++ b/spec/fixtures/an_upstream_tarball-0.1.tar.gz
Binary files differ
diff --git a/spec/fixtures/bad_pack-0.1-1.rockspec b/spec/fixtures/bad_pack-0.1-1.rockspec
new file mode 100644
index 0000000..2393424
--- /dev/null
+++ b/spec/fixtures/bad_pack-0.1-1.rockspec
@@ -0,0 +1,19 @@
+rockspec_format = "3.0"
+package = "bad_pack"
+version = "0.1-1"
+source = {
+ url = "http://localhost:8080/file/busted_project-0.1.tar.gz",
+ dir = "invalid_dir",
+}
+description = {
+ summary = "A project that uses Busted tests",
+}
+build = {
+ type = "builtin",
+ modules = {
+ sum = "sum.lua",
+ }
+}
+test = {
+ type = "busted",
+}
diff --git a/spec/fixtures/build_only_deps-0.1-1.rockspec b/spec/fixtures/build_only_deps-0.1-1.rockspec
new file mode 100644
index 0000000..02d2b47
--- /dev/null
+++ b/spec/fixtures/build_only_deps-0.1-1.rockspec
@@ -0,0 +1,18 @@
+package = "build_only_deps"
+version = "0.1-1"
+source = {
+ url = "file://./a_rock.lua"
+}
+description = {
+ summary = "Fixture to test --only-deps",
+}
+dependencies = {
+ "lua >= 5.1",
+ "a_rock 1.0",
+}
+build = {
+ type = "builtin",
+ modules = {
+ dummy = "a_rock.lua",
+ }
+}
diff --git a/spec/fixtures/build_only_deps-0.1-1.src.rock b/spec/fixtures/build_only_deps-0.1-1.src.rock
new file mode 100644
index 0000000..74b2d1e
--- /dev/null
+++ b/spec/fixtures/build_only_deps-0.1-1.src.rock
Binary files differ
diff --git a/spec/fixtures/busted_project-0.1-1.rockspec b/spec/fixtures/busted_project-0.1-1.rockspec
new file mode 100644
index 0000000..54ed28a
--- /dev/null
+++ b/spec/fixtures/busted_project-0.1-1.rockspec
@@ -0,0 +1,19 @@
+rockspec_format = "3.0"
+package = "busted_project"
+version = "0.1-1"
+source = {
+ url = "http://localhost:8080/file/busted_project-0.1.tar.gz",
+ dir = "busted_project",
+}
+description = {
+ summary = "A project that uses Busted tests",
+}
+build = {
+ type = "builtin",
+ modules = {
+ sum = "sum.lua",
+ }
+}
+test = {
+ type = "busted",
+}
diff --git a/spec/fixtures/busted_project-0.1.tar.gz b/spec/fixtures/busted_project-0.1.tar.gz
new file mode 100644
index 0000000..bd4e055
--- /dev/null
+++ b/spec/fixtures/busted_project-0.1.tar.gz
Binary files differ
diff --git a/spec/fixtures/busted_project/spec/sum_spec.lua b/spec/fixtures/busted_project/spec/sum_spec.lua
new file mode 100644
index 0000000..2fa0537
--- /dev/null
+++ b/spec/fixtures/busted_project/spec/sum_spec.lua
@@ -0,0 +1,10 @@
+
+local sum = require("sum")
+
+describe("sum", function()
+
+ it("sums", function()
+ assert.equal(2, sum.sum(1, 1))
+ end)
+
+end)
diff --git a/spec/fixtures/busted_project/sum.lua b/spec/fixtures/busted_project/sum.lua
new file mode 100644
index 0000000..ba12805
--- /dev/null
+++ b/spec/fixtures/busted_project/sum.lua
@@ -0,0 +1,7 @@
+local sum = {}
+
+function sum.sum(a, b)
+ return a + b
+end
+
+return sum
diff --git a/spec/fixtures/double_deploy_type/ddt.c b/spec/fixtures/double_deploy_type/ddt.c
new file mode 100644
index 0000000..f9050a4
--- /dev/null
+++ b/spec/fixtures/double_deploy_type/ddt.c
@@ -0,0 +1,6 @@
+#include "lua.h"
+
+int luaopen_ddt(lua_State *L) {
+ lua_pushstring(L, "ddt.c");
+ return 1;
+}
diff --git a/spec/fixtures/double_deploy_type/ddt1.lua b/spec/fixtures/double_deploy_type/ddt1.lua
new file mode 100644
index 0000000..ea1dafe
--- /dev/null
+++ b/spec/fixtures/double_deploy_type/ddt1.lua
@@ -0,0 +1 @@
+return "ddt1"
diff --git a/spec/fixtures/double_deploy_type/ddt2.lua b/spec/fixtures/double_deploy_type/ddt2.lua
new file mode 100644
index 0000000..b1fa5d7
--- /dev/null
+++ b/spec/fixtures/double_deploy_type/ddt2.lua
@@ -0,0 +1 @@
+return "ddt2"
diff --git a/spec/fixtures/double_deploy_type/ddt_file b/spec/fixtures/double_deploy_type/ddt_file
new file mode 100644
index 0000000..988bbfb
--- /dev/null
+++ b/spec/fixtures/double_deploy_type/ddt_file
@@ -0,0 +1 @@
+return "ddt_file"
diff --git a/spec/fixtures/double_deploy_type/double_deploy_type-0.1.0-1.rockspec b/spec/fixtures/double_deploy_type/double_deploy_type-0.1.0-1.rockspec
new file mode 100644
index 0000000..ff13df0
--- /dev/null
+++ b/spec/fixtures/double_deploy_type/double_deploy_type-0.1.0-1.rockspec
@@ -0,0 +1,22 @@
+package = "double_deploy_type"
+version = "0.1.0-1"
+source = {
+ url = "http://example.com"
+}
+description = {
+ homepage = "http://example.com",
+ license = "*** please specify a license ***"
+}
+dependencies = {}
+build = {
+ type = "builtin",
+ modules = {
+ ddt = "ddt/ddt.c"
+ },
+ install = {
+ lua = {
+ ddt = "ddt/ddt1.lua",
+ ddt_file = "ddt/ddt_file",
+ }
+ }
+}
diff --git a/spec/fixtures/double_deploy_type/double_deploy_type-0.2.0-1.rockspec b/spec/fixtures/double_deploy_type/double_deploy_type-0.2.0-1.rockspec
new file mode 100644
index 0000000..15f0c15
--- /dev/null
+++ b/spec/fixtures/double_deploy_type/double_deploy_type-0.2.0-1.rockspec
@@ -0,0 +1,22 @@
+package = "double_deploy_type"
+version = "0.2.0-1"
+source = {
+ url = "http://example.com"
+}
+description = {
+ homepage = "http://example.com",
+ license = "*** please specify a license ***"
+}
+dependencies = {}
+build = {
+ type = "builtin",
+ modules = {
+ ddt = "ddt/ddt.c"
+ },
+ install = {
+ lua = {
+ ddt = "ddt/ddt2.lua",
+ ddt_file = "ddt/ddt_file",
+ }
+ }
+}
diff --git a/spec/fixtures/fixturedep.c b/spec/fixtures/fixturedep.c
new file mode 100644
index 0000000..e3fcdd5
--- /dev/null
+++ b/spec/fixtures/fixturedep.c
@@ -0,0 +1,4 @@
+
+int fixturedep_fn() {
+ return 0;
+}
diff --git a/spec/fixtures/git_repo/LICENSE b/spec/fixtures/git_repo/LICENSE
new file mode 100644
index 0000000..e8c415d
--- /dev/null
+++ b/spec/fixtures/git_repo/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2018 Test
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/spec/fixtures/git_repo/README.md b/spec/fixtures/git_repo/README.md
new file mode 100644
index 0000000..220327e
--- /dev/null
+++ b/spec/fixtures/git_repo/README.md
@@ -0,0 +1,3 @@
+
+
+Test repo
diff --git a/spec/fixtures/gpg/private-keys-v1.d/5D2D3F97B88B18604D819EA9DF5B730C75D71B60.key b/spec/fixtures/gpg/private-keys-v1.d/5D2D3F97B88B18604D819EA9DF5B730C75D71B60.key
new file mode 100644
index 0000000..26240f5
--- /dev/null
+++ b/spec/fixtures/gpg/private-keys-v1.d/5D2D3F97B88B18604D819EA9DF5B730C75D71B60.key
Binary files differ
diff --git a/spec/fixtures/gpg/private-keys-v1.d/B71C36B4EDEB72A047FED1C01BCFF4D08837E3B1.key b/spec/fixtures/gpg/private-keys-v1.d/B71C36B4EDEB72A047FED1C01BCFF4D08837E3B1.key
new file mode 100644
index 0000000..e75a2eb
--- /dev/null
+++ b/spec/fixtures/gpg/private-keys-v1.d/B71C36B4EDEB72A047FED1C01BCFF4D08837E3B1.key
Binary files differ
diff --git a/spec/fixtures/gpg/pubring.kbx b/spec/fixtures/gpg/pubring.kbx
new file mode 100644
index 0000000..fc63cbc
--- /dev/null
+++ b/spec/fixtures/gpg/pubring.kbx
Binary files differ
diff --git a/spec/fixtures/gpg/trustdb.gpg b/spec/fixtures/gpg/trustdb.gpg
new file mode 100644
index 0000000..cabca66
--- /dev/null
+++ b/spec/fixtures/gpg/trustdb.gpg
Binary files differ
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 0000000..c2ecd16
--- /dev/null
+++ b/spec/fixtures/invalid_patch-0.1-1.rockspec
@@ -0,0 +1,29 @@
+package = "invalid_patch"
+version = "0.1-1"
+source = {
+ -- any valid URL
+ url = "https://raw.github.com/keplerproject/luarocks/master/src/luarocks/build.lua"
+}
+description = {
+ summary = "A rockspec with an invalid patch",
+}
+dependencies = {
+ "lua >= 5.1"
+}
+build = {
+ type = "builtin",
+ modules = {
+ build = "build.lua"
+ },
+ patches = {
+ ["I_am_an_invalid_patch.patch"] =
+[[
+diff -Naur luadoc-3.0.1/src/luadoc/doclet/html.lua luadoc-3.0.1-new/src/luadoc/doclet/html.lua
+--- luadoc-3.0.1/src/luadoc/doclet/html.lua2007-12-21 15:50:48.000000000 -0200
++++ luadoc-3.0.1-new/src/luadoc/doclet/html.lua2008-02-28 01:59:53.000000000 -0300
+@@ -18,6 +18,7 @@
+- gabba gabba gabba
++ gobo gobo gobo
+]]
+ }
+}
diff --git a/spec/fixtures/invalid_say-1.3-1.rockspec b/spec/fixtures/invalid_say-1.3-1.rockspec
new file mode 100644
index 0000000..890b4db
--- /dev/null
+++ b/spec/fixtures/invalid_say-1.3-1.rockspec
@@ -0,0 +1,23 @@
+package = "say"
+version = "1.3-1"
+source = {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{++{
+ url = "https://github.com/Olivine-Labs/say/archive/v1.3-1.tar.gz",
+ dir = "say-1.3-1"
+}
+description = {
+ summary = "Lua String Hashing/Indexing Library",
+ detailed = [[
+ Useful for internationalization.
+ ]],
+ homepage = "http://olivinelabs.com/busted/",
+ license = "MIT <http://opensource.org/licenses/MIT>"
+}
+dependencies = {
+ "lua >= 5.1"
+}
+build = {
+ type = "builtin",
+ modules = {
+ ["say.init"] = "src/init.lua"
+ }
+}
diff --git a/spec/fixtures/legacyexternalcommand-0.1-1.rockspec b/spec/fixtures/legacyexternalcommand-0.1-1.rockspec
new file mode 100644
index 0000000..47bcbb0
--- /dev/null
+++ b/spec/fixtures/legacyexternalcommand-0.1-1.rockspec
@@ -0,0 +1,17 @@
+package = "legacyexternalcommand"
+version = "0.1-1"
+source = {
+ url = "http://localhost:8080/file/legacyexternalcommand.lua"
+}
+description = {
+ summary = "an external command with legacy arg parsing",
+}
+dependencies = {
+ "lua >= 5.1"
+}
+build = {
+ type = "builtin",
+ modules = {
+ ["luarocks.cmd.external.legacyexternalcommand"] = "legacyexternalcommand.lua",
+ }
+}
diff --git a/spec/fixtures/legacyexternalcommand.lua b/spec/fixtures/legacyexternalcommand.lua
new file mode 100644
index 0000000..af57537
--- /dev/null
+++ b/spec/fixtures/legacyexternalcommand.lua
@@ -0,0 +1,34 @@
+
+--- Module implementing an external command with legacy arg parsing.
+local legacyexternalcommand = {}
+
+local util = require("luarocks.util")
+
+legacyexternalcommand.help_summary = "generate legacyexternalcommand package files of a rock."
+legacyexternalcommand.help_arguments = "arg1 [arg2]"
+legacyexternalcommand.help = [[
+This addon generates legacyexternalcommand package files of a rock.
+First argument is the name of a rock, the second argument is optional
+and needed when legacyexternalcommand uses another name (usually prefixed by lua-).
+Files are generated with the source content of the rock and more
+especially the rockspec. So, the rock is downloaded and unpacked.
+]]
+
+--- Driver function for the "legacyexternalcommand" command.
+-- @param arg1 string: arg1.
+-- @param arg2 string: arg2 (optional)
+-- @return boolean: true if successful
+function legacyexternalcommand.command(flags, arg1, arg2)
+ if type(arg1) ~= 'string' then
+ return nil, "Argument missing. "..util.see_help('legacyexternalcommand')
+ end
+
+ for k,v in pairs(flags) do
+ print("FLAGS", k,v)
+ end
+ print("ARG1", tostring(arg1))
+ print("ARG2", tostring(arg2))
+ return true
+end
+
+return legacyexternalcommand
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 0000000..f820460
--- /dev/null
+++ b/spec/fixtures/luajit-fail-1.0-1.rockspec
@@ -0,0 +1,22 @@
+package = "luajit-fail"
+version = "1.0-1"
+source = {
+ url = "https://raw.githubusercontent.com/keplerproject/luarocks/master/test/testing.lua",
+}
+description = {
+ summary = "Test luajit dependency fail",
+ detailed = [[
+Fail luajit dependency when running with rockspec_format < 3.0.
+]],
+ homepage = "http://luarocks.org/",
+ license = "MIT/X license"
+}
+dependencies = {
+ "luajit >= 2.0"
+}
+build = {
+ type = "builtin",
+ modules = {
+ testing = "testing.lua"
+ }
+}
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 0000000..31c930c
--- /dev/null
+++ b/spec/fixtures/luajit-success-1.0-1.rockspec
@@ -0,0 +1,23 @@
+rockspec_format = "3.0"
+package = "luajit-success"
+version = "1.0-1"
+source = {
+ url = "https://raw.githubusercontent.com/keplerproject/luarocks/master/test/testing.lua",
+}
+description = {
+ summary = "Test luajit dependency fail",
+ detailed = [[
+Use luajit dependency when running with rockspec_format >= 3.0.
+]],
+ homepage = "http://luarocks.org/",
+ license = "MIT/X license"
+}
+dependencies = {
+ "luajit >= 2.0"
+}
+build = {
+ type = "builtin",
+ modules = {
+ testing = "testing.lua"
+ }
+}
diff --git a/spec/fixtures/mixed_deploy_type/mdt.c b/spec/fixtures/mixed_deploy_type/mdt.c
new file mode 100644
index 0000000..a162ce2
--- /dev/null
+++ b/spec/fixtures/mixed_deploy_type/mdt.c
@@ -0,0 +1,6 @@
+#include "lua.h"
+
+int luaopen_mdt(lua_State *L) {
+ lua_pushstring(L, "mdt.c");
+ return 1;
+}
diff --git a/spec/fixtures/mixed_deploy_type/mdt.lua b/spec/fixtures/mixed_deploy_type/mdt.lua
new file mode 100644
index 0000000..c9ca9c6
--- /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 0000000..1a15f7d
--- /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 0000000..91b725d
--- /dev/null
+++ b/spec/fixtures/mixed_deploy_type/mixed_deploy_type-0.1.0-1.rockspec
@@ -0,0 +1,21 @@
+package = "mixed_deploy_type"
+version = "0.1.0-1"
+source = {
+ url = "http://example.com"
+}
+description = {
+ homepage = "http://example.com",
+ license = "*** please specify a license ***"
+}
+dependencies = {}
+build = {
+ type = "builtin",
+ modules = {
+ mdt = "mdt/mdt.lua"
+ },
+ install = {
+ lua = {
+ mdt_file = "mdt/mdt_file"
+ }
+ }
+}
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 0000000..9ca0318
--- /dev/null
+++ b/spec/fixtures/mixed_deploy_type/mixed_deploy_type-0.2.0-1.rockspec
@@ -0,0 +1,21 @@
+package = "mixed_deploy_type"
+version = "0.2.0-1"
+source = {
+ url = "http://example.com"
+}
+description = {
+ homepage = "http://example.com",
+ license = "*** please specify a license ***"
+}
+dependencies = {}
+build = {
+ type = "builtin",
+ modules = {
+ mdt = "mdt/mdt.c"
+ },
+ install = {
+ lib = {
+ mdt_file = "mdt/mdt_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 0000000..3d55da5
--- /dev/null
+++ b/spec/fixtures/patch_create_delete-0.1-1.rockspec
@@ -0,0 +1,34 @@
+rockspec_format = "3.0"
+package = "patch_create_delete"
+version = "0.1-1"
+source = {
+ -- any valid URL
+ url = "git://github.com/luarocks/luarocks"
+}
+description = {
+ summary = "A rockspec with a patch that creates and deletes files",
+}
+dependencies = {
+ "lua >= 5.1"
+}
+build = {
+ type = "builtin",
+ modules = {
+ ["luarocks.loader"] = "src/luarocks/loader.lua"
+ },
+ patches = {
+ ["create_delete.patch"] =
+[[
+diff -Naur luarocks/spec/fixtures/patch_create_delete/a_file.txt luarocks-patch/spec/fixtures/patch_create_delete/a_file.txt
+--- luarocks/spec/fixtures/patch_create_delete/a_file.txt 2017-10-04 15:39:44.179306674 -0300
++++ luarocks-patch/spec/fixtures/patch_create_delete/a_file.txt 1969-12-31 21:00:00.000000000 -0300
+@@ -1 +0,0 @@
+-I am a file.
+diff -Naur luarocks/spec/fixtures/patch_create_delete/another_file.txt luarocks-patch/spec/fixtures/patch_create_delete/another_file.txt
+--- luarocks/spec/fixtures/patch_create_delete/another_file.txt 1969-12-31 21:00:00.000000000 -0300
++++ luarocks-patch/spec/fixtures/patch_create_delete/another_file.txt 2017-10-04 15:40:12.836306564 -0300
+@@ -0,0 +1 @@
++I am another file.
+]]
+ }
+}
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 0000000..6539c24
--- /dev/null
+++ b/spec/fixtures/patch_create_delete/a_file.txt
@@ -0,0 +1 @@
+I am a file.
diff --git a/spec/fixtures/renamed_upstream_tarball-0.1.tar.gz b/spec/fixtures/renamed_upstream_tarball-0.1.tar.gz
new file mode 100644
index 0000000..518c8cb
--- /dev/null
+++ b/spec/fixtures/renamed_upstream_tarball-0.1.tar.gz
Binary files differ
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 0000000..45fea4b
--- /dev/null
+++ b/spec/fixtures/with_external_dep-0.1-1.rockspec
@@ -0,0 +1,25 @@
+package = "with_external_dep"
+version = "0.1-1"
+source = {
+ url = "http://localhost:8080/file/with_external_dep.c"
+}
+description = {
+ summary = "An example rockspec",
+}
+external_dependencies = {
+ FOO = {
+ header = "foo/foo.h"
+ }
+}
+dependencies = {
+ "lua >= 5.1"
+}
+build = {
+ type = "builtin",
+ modules = {
+ with_external_dep = {
+ sources = "with_external_dep.c",
+ incdirs = "$(FOO_INCDIR)",
+ }
+ }
+}
diff --git a/spec/fixtures/with_external_dep.c b/spec/fixtures/with_external_dep.c
new file mode 100644
index 0000000..16435d8
--- /dev/null
+++ b/spec/fixtures/with_external_dep.c
@@ -0,0 +1,10 @@
+#include <foo/foo.h>
+#include <lua.h>
+#include <lauxlib.h>
+
+int luaopen_with_external_dep(lua_State* L) {
+ lua_newtable(L);
+ lua_pushinteger(L, FOO);
+ lua_setfield(L, -2, "foo");
+ return 1;
+}
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 0000000..eedd558
--- /dev/null
+++ b/spec/fixtures/with_external_dep/foo/foo.h
@@ -0,0 +1 @@
+#define FOO 42