tests/test-import.t
branchstable
changeset 16650 fcb97d9a26cd
parent 16124 0e0060bf2f44
child 16888 040b8c08b6c0
--- a/tests/test-import.t	Fri May 11 22:48:19 2012 -0700
+++ b/tests/test-import.t	Sat May 12 16:10:01 2012 +0900
@@ -997,6 +997,26 @@
   c3
   c4
 
+no segfault while importing a unified diff which start line is zero but chunk
+size is non-zero
+
+  $ hg init startlinezero
+  $ cd startlinezero
+  $ echo foo > foo
+  $ hg commit -Amfoo
+  adding foo
+
+  $ hg import --no-commit - << EOF
+  > diff a/foo b/foo
+  > --- a/foo
+  > +++ b/foo
+  > @@ -0,1 +0,1 @@
+  >  foo
+  > EOF
+  applying patch from stdin
+
+  $ cd ..
+
 Test corner case involving fuzz and skew
 
   $ hg init morecornercases