aboutsummaryrefslogtreecommitdiff
path: root/testsuite/patch.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/patch.tests')
-rwxr-xr-xtestsuite/patch.tests30
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/patch.tests b/testsuite/patch.tests
index c604b9c1d..2759d2ad4 100755
--- a/testsuite/patch.tests
+++ b/testsuite/patch.tests
@@ -212,6 +212,36 @@ patching file input
212 666 212 666
213" \ 213" \
214 214
215# testing "test name" "command(s)" "expected result" "file input" "stdin"
216testing "patch creates new file" \
217 'patch 2>&1; echo $?; cat testfile; rm testfile' \
218"\
219creating testfile
2200
221qwerty
222" "" "\
223--- /dev/null
224+++ testfile
225@@ -0,0 +1 @@
226+qwerty
227"
228
229# testing "test name" "command(s)" "expected result" "file input" "stdin"
230testing "patch understands ...dir///dir..." \
231 'patch -p1 2>&1; echo $?' \
232"\
233patching file dir2///file
234patch: can't open 'dir2///file': No such file or directory
2351
236" "" "\
237--- bogus_dir///dir2///file
238+++ bogus_dir///dir2///file
239@@ -1,2 +1,3 @@
240 qwe
241+asd
242 zxc
243"
244
215rm input.orig 2>/dev/null 245rm input.orig 2>/dev/null
216 246
217exit $FAILCOUNT 247exit $FAILCOUNT