From a4160e15ec866005f3ad30c967bc4829fbb1c8e3 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 16 Aug 2010 01:33:57 +0200 Subject: patch: add -N and a test for it (fails for now) Signed-off-by: Denys Vlasenko --- testsuite/patch.tests | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'testsuite/patch.tests') diff --git a/testsuite/patch.tests b/testsuite/patch.tests index 6ee795dba..e663b32a3 100755 --- a/testsuite/patch.tests +++ b/testsuite/patch.tests @@ -4,7 +4,7 @@ . ./testing.sh -# testing "test name" "options" "expected result" "file input" "stdin" +# testing "test name" "command(s)" "expected result" "file input" "stdin" testing "patch with old_file == new_file" \ 'patch 2>&1; echo $?; cat input' \ @@ -126,6 +126,31 @@ abc +456 " \ +# testing "test name" "command(s)" "expected result" "file input" "stdin" + +testing "patch -N ignores already applied hunk" \ + 'patch -N 2>&1; echo $?; cat input' \ +"\ +patching file input +0 +abc +def +123 +" \ +"\ +abc +def +123 +" \ +"\ +--- input ++++ input +@@ -1,2 +1,3 @@ + abc ++def + 123 +" \ + rm input.orig 2>/dev/null exit $FAILCOUNT -- cgit v1.2.3