aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2017-10-04 15:52:12 -0300
committerHisham Muhammad <hisham@gobolinux.org>2017-10-04 15:53:38 -0300
commitc4b66299b1259a1e3d6bfef83d912332ccc58061 (patch)
tree69357d54bddec5db65623b9dbf588afe4719a1f6
parent18ed68c91646c20ae9bc21d0fe378898caf3c506 (diff)
downloadluarocks-c4b66299b1259a1e3d6bfef83d912332ccc58061.tar.gz
luarocks-c4b66299b1259a1e3d6bfef83d912332ccc58061.tar.bz2
luarocks-c4b66299b1259a1e3d6bfef83d912332ccc58061.zip
Add test fixture for creating/deleting files in a patch.
-rw-r--r--test/testfiles/patch_create_delete-0.1-1.rockspec34
-rw-r--r--test/testfiles/patch_create_delete/a_file.txt1
2 files changed, 35 insertions, 0 deletions
diff --git a/test/testfiles/patch_create_delete-0.1-1.rockspec b/test/testfiles/patch_create_delete-0.1-1.rockspec
new file mode 100644
index 00000000..069e2912
--- /dev/null
+++ b/test/testfiles/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/test/testfiles/patch_create_delete/a_file.txt luarocks-patch/test/testfiles/patch_create_delete/a_file.txt
23--- luarocks/test/testfiles/patch_create_delete/a_file.txt 2017-10-04 15:39:44.179306674 -0300
24+++ luarocks-patch/test/testfiles/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/test/testfiles/patch_create_delete/another_file.txt luarocks-patch/test/testfiles/patch_create_delete/another_file.txt
28--- luarocks/test/testfiles/patch_create_delete/another_file.txt 1969-12-31 21:00:00.000000000 -0300
29+++ luarocks-patch/test/testfiles/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/test/testfiles/patch_create_delete/a_file.txt b/test/testfiles/patch_create_delete/a_file.txt
new file mode 100644
index 00000000..6539c24e
--- /dev/null
+++ b/test/testfiles/patch_create_delete/a_file.txt
@@ -0,0 +1 @@
I am a file.