summaryrefslogtreecommitdiff
path: root/test/tools/patch
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2024-01-22 20:23:52 +1100
committerMaxime Coste <mawww@kakoune.org>2024-01-22 20:23:52 +1100
commit1194aa861e26fc079d2469edbac891eb524d30bb (patch)
treeb41c25a525b3e5d0fd46c296012f307eb459f51f /test/tools/patch
parenta500d27ef177e72f636b258269459ba6081ca86b (diff)
parent1276e67ef720b19bfe5354495ae72e08c00226ee (diff)
Merge remote-tracking branch 'krobelus/patch-context-only-filediff'
Diffstat (limited to 'test/tools/patch')
-rw-r--r--test/tools/patch/ignore-first-file/cmd1
-rw-r--r--test/tools/patch/ignore-first-file/in11
-rw-r--r--test/tools/patch/ignore-first-file/out19
-rw-r--r--test/tools/patch/ignore-first-file/rc1
4 files changed, 32 insertions, 0 deletions
diff --git a/test/tools/patch/ignore-first-file/cmd b/test/tools/patch/ignore-first-file/cmd
new file mode 100644
index 00000000..2b5ac0b6
--- /dev/null
+++ b/test/tools/patch/ignore-first-file/cmd
@@ -0,0 +1 @@
+%:patch tee applied.diff<ret><ret>!echo Applied:; cat applied.diff; echo; echo Updated buffer:<ret>
diff --git a/test/tools/patch/ignore-first-file/in b/test/tools/patch/ignore-first-file/in
new file mode 100644
index 00000000..5738a9b9
--- /dev/null
+++ b/test/tools/patch/ignore-first-file/in
@@ -0,0 +1,11 @@
+diff -ur a/file1 b/file1
+--- a/file1
++++ b/file1
+@@ -1 +1 @@
+ file1 here
+diff -ur a/file2 b/file2
+--- a/file2
++++ b/file2
+@@ -1 +1 @@
+-file2 here
++modified file2 here
diff --git a/test/tools/patch/ignore-first-file/out b/test/tools/patch/ignore-first-file/out
new file mode 100644
index 00000000..11d3d3af
--- /dev/null
+++ b/test/tools/patch/ignore-first-file/out
@@ -0,0 +1,19 @@
+Applied:
+diff -ur a/file2 b/file2
+--- a/file2
++++ b/file2
+@@ -1 +1 @@
+-file2 here
++modified file2 here
+
+Updated buffer:
+diff -ur a/file1 b/file1
+--- a/file1
++++ b/file1
+@@ -1 +1 @@
+ file1 here
+diff -ur a/file2 b/file2
+--- a/file2
++++ b/file2
+@@ -1 +1 @@
+ modified file2 here
diff --git a/test/tools/patch/ignore-first-file/rc b/test/tools/patch/ignore-first-file/rc
new file mode 100644
index 00000000..62ee8585
--- /dev/null
+++ b/test/tools/patch/ignore-first-file/rc
@@ -0,0 +1 @@
+source "%val{runtime}/rc/tools/patch.kak"