tests/test-diff-ignore-whitespace.t
branchstable
changeset 16089 2e8f4b82c551
parent 15509 3774e1453ef4
child 17742 405b6bd015df
--- a/tests/test-diff-ignore-whitespace.t	Mon Feb 06 15:22:27 2012 -0600
+++ b/tests/test-diff-ignore-whitespace.t	Mon Feb 06 21:17:50 2012 +0100
@@ -455,3 +455,46 @@
   +hello 
   +world
    goodbye world
+
+Test hunk offsets adjustments with --ignore-blank-lines
+
+  $ hg revert -aC
+  reverting foo
+  $ printf '\nb\nx\nd\n' > a
+  $ printf 'b\ny\nd\n' > b
+  $ hg add a b
+  $ hg ci -m add
+  $ hg cat -r . a > b
+  $ hg cat -r . b > a
+  $ hg diff -B --nodates a > ../diffa
+  $ cat ../diffa
+  diff -r 0e66aa54f318 a
+  --- a/a
+  +++ b/a
+  @@ -1,4 +1,4 @@
+   
+   b
+  -x
+  +y
+   d
+  $ hg diff -B --nodates b > ../diffb
+  $ cat ../diffb
+  diff -r 0e66aa54f318 b
+  --- a/b
+  +++ b/b
+  @@ -1,3 +1,3 @@
+   b
+  -y
+  +x
+   d
+  $ hg revert -aC
+  reverting a
+  reverting b
+  $ hg import --no-commit ../diffa
+  applying ../diffa
+  $ hg revert -aC
+  reverting a
+  $ hg import --no-commit ../diffb
+  applying ../diffb
+  $ hg revert -aC
+  reverting b