tests/test-import.t
branchstable
changeset 16124 0e0060bf2f44
parent 16123 b0c7525f826d
child 16650 fcb97d9a26cd
--- a/tests/test-import.t	Mon Feb 13 16:47:31 2012 +0100
+++ b/tests/test-import.t	Mon Feb 13 17:22:35 2012 +0100
@@ -445,7 +445,7 @@
   $ hg import --no-commit -v fuzzy-tip.patch
   applying fuzzy-tip.patch
   patching file a
-  Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines).
+  Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines).
   applied to working directory
   $ hg revert -a
   reverting a
@@ -462,7 +462,7 @@
   $ hg --config patch.eol=auto import --no-commit -v fuzzy-tip.patch
   applying fuzzy-tip.patch
   patching file a
-  Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines).
+  Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines).
   applied to working directory
   $ cd ..
 
@@ -1029,6 +1029,19 @@
   > +line
   > EOF
 
+  $ cat > 04-middle-of-file-completely-fuzzed.diff <<EOF
+  > diff --git a/a b/a
+  > --- a/a
+  > +++ b/a
+  > @@ -1,1 +1,1 @@
+  > -2
+  > +add some skew
+  > @@ -2,2 +2,3 @@
+  >  not matching, should fuzz
+  >  ... a bit
+  > +line
+  > EOF
+
   $ cat > a <<EOF
   > 1
   > 2
@@ -1071,4 +1084,14 @@
   3
   4
   line
+  applying 04-middle-of-file-completely-fuzzed.diff
+  patching file a
+  Hunk #1 succeeded at 2 (offset 1 lines).
+  Hunk #2 succeeded at 5 with fuzz 2 (offset 1 lines).
+  applied to working directory
+  1
+  add some skew
+  3
+  4
+  line