summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko2010-08-16 01:33:57 +0200
committerDenys Vlasenko2010-08-16 01:33:57 +0200
commita4160e15ec866005f3ad30c967bc4829fbb1c8e3 (patch)
tree327595a838d2f707149c03fdaea2377c595f779f /testsuite
parent6373bb7740c6256154f6b1728321fd636e4f5a2a (diff)
downloadbusybox-a4160e15ec866005f3ad30c967bc4829fbb1c8e3.zip
busybox-a4160e15ec866005f3ad30c967bc4829fbb1c8e3.tar.gz
patch: add -N and a test for it (fails for now)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/patch.tests27
1 files changed, 26 insertions, 1 deletions
diff --git a/testsuite/patch.tests b/testsuite/patch.tests
index 6ee795d..e663b32 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