summaryrefslogtreecommitdiff
path: root/quilt/patches/test_broken_patches
diff options
context:
space:
mode:
Diffstat (limited to 'quilt/patches/test_broken_patches')
-rw-r--r--quilt/patches/test_broken_patches39
1 files changed, 39 insertions, 0 deletions
diff --git a/quilt/patches/test_broken_patches b/quilt/patches/test_broken_patches
new file mode 100644
index 0000000..c161288
--- /dev/null
+++ b/quilt/patches/test_broken_patches
@@ -0,0 +1,39 @@
+---
+ test/file-not-found.test | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+Index: b/test/file-not-found.test
+===================================================================
+--- /dev/null
++++ b/test/file-not-found.test
+@@ -0,0 +1,30 @@
++# Try to push a patch touching a file which does not exist in this tree
++
++$ rm -rf d
++$ mkdir -p d/patches
++$ cd d
++
++$ mkdir subdir
++$ echo foo > subdir/file.txt
++$ echo bar > subdir/other.txt
++$ diff -u subdir/file.txt subdir/other.txt > patches/patch
++# simulate --no-timestamp
++$ sed 's|subdir/file.txt.*|subdir/file.txt|' patches/patch > patches/patch2
++$ sed 's|subdir/other.txt.*|subdir/other.txt|' patches/patch2 > patches/patch
++$ rm subdir/other.txt patches/patch2
++$ echo patch > patches/series
++
++$ quilt push
++> Applying patch patches/patch
++> patching file other.txt
++> Hunk #1 FAILED at 1.
++> 1 out of 1 hunk FAILED -- rejects in file other.txt
++> Patch patches/patch does not apply (enforce with -f)
++
++$ quilt push -qf
++> Applying patch patches/patch
++> 1 out of 1 hunk FAILED -- saving rejects to file other.txt.rej
++> Applied patch patches/patch (forced; needs refresh)
++
++$ cd ..
++$ rm -rf d