aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2010-08-13 15:50:26 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-08-13 15:50:26 +0200
commit1bbc0cd7f293aac5e15d6c1e16bee9f1484c6fbf (patch)
treea2a5ba8d9508982f80b702a99c2e10d1644ae40e /testsuite
parentdcaed97e0f44d0cd285fb590ec6ec80d0d73e738 (diff)
downloadbusybox-w32-1bbc0cd7f293aac5e15d6c1e16bee9f1484c6fbf.tar.gz
busybox-w32-1bbc0cd7f293aac5e15d6c1e16bee9f1484c6fbf.tar.bz2
busybox-w32-1bbc0cd7f293aac5e15d6c1e16bee9f1484c6fbf.zip
patch: replace it with toybox's implementation
Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/patch.tests13
-rw-r--r--testsuite/testing.sh3
2 files changed, 10 insertions, 6 deletions
diff --git a/testsuite/patch.tests b/testsuite/patch.tests
index 749d936ea..6ee795dba 100755
--- a/testsuite/patch.tests
+++ b/testsuite/patch.tests
@@ -7,7 +7,7 @@
7# testing "test name" "options" "expected result" "file input" "stdin" 7# testing "test name" "options" "expected result" "file input" "stdin"
8 8
9testing "patch with old_file == new_file" \ 9testing "patch with old_file == new_file" \
10 'patch; echo $?; cat input' \ 10 'patch 2>&1; echo $?; cat input' \
11"\ 11"\
12patching file input 12patching file input
130 130
@@ -29,7 +29,7 @@ zxc
29" \ 29" \
30 30
31testing "patch with nonexistent old_file" \ 31testing "patch with nonexistent old_file" \
32 'patch; echo $?; cat input' \ 32 'patch 2>&1; echo $?; cat input' \
33"\ 33"\
34patching file input 34patching file input
350 350
@@ -51,7 +51,7 @@ zxc
51" \ 51" \
52 52
53testing "patch -R with nonexistent old_file" \ 53testing "patch -R with nonexistent old_file" \
54 'patch -R; echo $?; cat input' \ 54 'patch -R 2>&1; echo $?; cat input' \
55"\ 55"\
56patching file input 56patching file input
570 570
@@ -75,9 +75,12 @@ zxc
75testing "patch detects already applied hunk" \ 75testing "patch detects already applied hunk" \
76 'patch 2>&1; echo $?; cat input' \ 76 'patch 2>&1; echo $?; cat input' \
77"\ 77"\
78Possibly reversed hunk 1 at 2
79Hunk 1 FAILED 1/1.
80 abc
81+def
82 123
78patching file input 83patching file input
79patch: hunk #1 FAILED at 1
80patch: 1 out of 1 hunk FAILED
811 841
82abc 85abc
83def 86def
diff --git a/testsuite/testing.sh b/testsuite/testing.sh
index f907deade..c7c9ca6af 100644
--- a/testsuite/testing.sh
+++ b/testsuite/testing.sh
@@ -1,4 +1,4 @@
1# Simple test harness infrastructurei for BusyBox 1# Simple test harness infrastructure for BusyBox
2# 2#
3# Copyright 2005 by Rob Landley 3# Copyright 2005 by Rob Landley
4# 4#
@@ -87,6 +87,7 @@ testing()
87 87
88 $ECHO -ne "$3" > expected 88 $ECHO -ne "$3" > expected
89 $ECHO -ne "$4" > input 89 $ECHO -ne "$4" > input
90 [ -z "$VERBOSE" ] || echo "echo -ne '$4' >input"
90 [ -z "$VERBOSE" ] || echo "echo -ne '$5' | $2" 91 [ -z "$VERBOSE" ] || echo "echo -ne '$5' | $2"
91 $ECHO -ne "$5" | eval "$2" > actual 92 $ECHO -ne "$5" | eval "$2" > actual
92 RETVAL=$? 93 RETVAL=$?