patch: add another test (currently fails)
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 24 Oct 2009 22:35:04 +0000 (00:35 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 24 Oct 2009 22:35:04 +0000 (00:35 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
testsuite/patch.tests

index 178048d2a3a7d972dcdb85069f7a41577c0edd71..1bdc0c24ab0cbde4d5a448d9d053b188a4b05562 100755 (executable)
@@ -97,4 +97,30 @@ def
  123
 " \
 
+# Currently fails (erroneously appends second "456" line):
+false && testing "patch detects already applied hunk" \
+       'patch 2>&1; echo $?; cat input' \
+"\
+patching file input
+patch: hunk #1 FAILED at 2
+patch: 1 out of 1 hunk FAILED
+1
+abc
+123
+456
+" \
+"\
+abc
+123
+456
+" \
+"\
+--- input.old  Jan 01 01:01:01 2000
++++ input      Jan 01 01:01:01 2000
+@@ -1,2 +1,3 @@
+ abc
+ 123
++456
+" \
+
 exit $FAILCOUNT