aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-05-12 01:49:04 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-05-12 01:49:04 +0200
commita2215b98f7d65bc613b9c8f008d79672402c6a07 (patch)
treea522b707160253cba5805279b871cc33dabc24ce /testsuite
parent94043e8ad2d30cc2199b35d18c853314ade174a3 (diff)
downloadbusybox-w32-a2215b98f7d65bc613b9c8f008d79672402c6a07.tar.gz
busybox-w32-a2215b98f7d65bc613b9c8f008d79672402c6a07.tar.bz2
busybox-w32-a2215b98f7d65bc613b9c8f008d79672402c6a07.zip
sed: fix a command with multible trailing backslashes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/sed.tests14
-rw-r--r--[-rwxr-xr-x]testsuite/testing.sh2
2 files changed, 15 insertions, 1 deletions
diff --git a/testsuite/sed.tests b/testsuite/sed.tests
index b0de9657c..5b0750cac 100755
--- a/testsuite/sed.tests
+++ b/testsuite/sed.tests
@@ -258,4 +258,18 @@ testing "sed nested {}s" \
258 "qwe\nasd\nacd\nacd\n" "" \ 258 "qwe\nasd\nacd\nacd\n" "" \
259 "qwe\nasd\nzxc\n" 259 "qwe\nasd\nzxc\n"
260 260
261testing "sed a cmd ended by double backslash" \
262 "sed -e '/| one /a \\
263 | three \\\\' -e '/| one-/a \\
264 | three-* \\\\'" \
265' | one \\
266 | three \\
267 | two \\
268' '' \
269' | one \\
270 | two \\
271'
272
273# testing "description" "arguments" "result" "infile" "stdin"
274
261exit $FAILCOUNT 275exit $FAILCOUNT
diff --git a/testsuite/testing.sh b/testsuite/testing.sh
index 65a0f6529..913d7f8ef 100755..100644
--- a/testsuite/testing.sh
+++ b/testsuite/testing.sh
@@ -73,7 +73,7 @@ testing()
73 73
74 if [ $# -ne 5 ] 74 if [ $# -ne 5 ]
75 then 75 then
76 echo "Test $NAME has wrong number of arguments (must be 5) ($# $*)" >&2 76 echo "Test $NAME has wrong number of arguments: $# (must be 5)" >&2
77 exit 1 77 exit 1
78 fi 78 fi
79 79