diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-08-22 05:39:15 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-08-22 05:39:15 +0200 |
commit | e7b0a9e5bc60617fb00c321430253d7771d40fd3 (patch) | |
tree | 5152c7e606fb72423de8d56c5c97a977c6852033 /testsuite | |
parent | fd27fa83094a85b3e8cb0485467ffa65b572b923 (diff) | |
download | busybox-e7b0a9e5bc60617fb00c321430253d7771d40fd3.tar.gz |
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')
-rwxr-xr-x | testsuite/patch.tests | 24 |
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 " \ # testing "test name" "command(s)" "expected result" "file input" "stdin" - testing "patch -N ignores already applied hunk" \ 'patch -N 2>&1; echo $?; cat input' \ "\ @@ -153,6 +152,29 @@ def 123 " \ +# testing "test name" "command(s)" "expected result" "file input" "stdin" +testing "patch FILE PATCH" \ + 'cat >a.patch; patch input a.patch 2>&1; echo $?; cat input; rm a.patch' \ +"\ +patching file input +0 +abc +def +123 +" \ +"\ +abc +123 +" \ +"\ +--- foo.old ++++ foo +@@ -1,2 +1,3 @@ + abc ++def + 123 +" \ + rm input.orig 2>/dev/null exit $FAILCOUNT |