aboutsummaryrefslogtreecommitdiff
path: root/testsuite/patch.tests
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-08-22 05:39:15 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-08-22 05:39:15 +0200
commite7b0a9e5bc60617fb00c321430253d7771d40fd3 (patch)
tree5152c7e606fb72423de8d56c5c97a977c6852033 /testsuite/patch.tests
parentfd27fa83094a85b3e8cb0485467ffa65b572b923 (diff)
downloadbusybox-w32-e7b0a9e5bc60617fb00c321430253d7771d40fd3.tar.gz
busybox-w32-e7b0a9e5bc60617fb00c321430253d7771d40fd3.tar.bz2
busybox-w32-e7b0a9e5bc60617fb00c321430253d7771d40fd3.zip
patch: support "patch [FILE [PATCH]]" format
function old new delta xopen_stdin - 15 +15 patch_main 2075 2041 -34 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/patch.tests')
-rwxr-xr-xtestsuite/patch.tests24
1 files changed, 23 insertions, 1 deletions
diff --git a/testsuite/patch.tests b/testsuite/patch.tests
index cd0e965cf..e482304f6 100755
--- a/testsuite/patch.tests
+++ b/testsuite/patch.tests
@@ -129,7 +129,6 @@ abc
129" \ 129" \
130 130
131# testing "test name" "command(s)" "expected result" "file input" "stdin" 131# testing "test name" "command(s)" "expected result" "file input" "stdin"
132
133testing "patch -N ignores already applied hunk" \ 132testing "patch -N ignores already applied hunk" \
134 'patch -N 2>&1; echo $?; cat input' \ 133 'patch -N 2>&1; echo $?; cat input' \
135"\ 134"\
@@ -153,6 +152,29 @@ def
153 123 152 123
154" \ 153" \
155 154
155# testing "test name" "command(s)" "expected result" "file input" "stdin"
156testing "patch FILE PATCH" \
157 'cat >a.patch; patch input a.patch 2>&1; echo $?; cat input; rm a.patch' \
158"\
159patching file input
1600
161abc
162def
163123
164" \
165"\
166abc
167123
168" \
169"\
170--- foo.old
171+++ foo
172@@ -1,2 +1,3 @@
173 abc
174+def
175 123
176" \
177
156rm input.orig 2>/dev/null 178rm input.orig 2>/dev/null
157 179
158exit $FAILCOUNT 180exit $FAILCOUNT