sed: fix a command with multible trailing backslashes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -258,4 +258,18 @@ testing "sed nested {}s" \
|
||||
"qwe\nasd\nacd\nacd\n" "" \
|
||||
"qwe\nasd\nzxc\n"
|
||||
|
||||
testing "sed a cmd ended by double backslash" \
|
||||
"sed -e '/| one /a \\
|
||||
| three \\\\' -e '/| one-/a \\
|
||||
| three-* \\\\'" \
|
||||
' | one \\
|
||||
| three \\
|
||||
| two \\
|
||||
' '' \
|
||||
' | one \\
|
||||
| two \\
|
||||
'
|
||||
|
||||
# testing "description" "arguments" "result" "infile" "stdin"
|
||||
|
||||
exit $FAILCOUNT
|
||||
|
2
testsuite/testing.sh
Executable file → Normal file
2
testsuite/testing.sh
Executable file → Normal file
@@ -73,7 +73,7 @@ testing()
|
||||
|
||||
if [ $# -ne 5 ]
|
||||
then
|
||||
echo "Test $NAME has wrong number of arguments (must be 5) ($# $*)" >&2
|
||||
echo "Test $NAME has wrong number of arguments: $# (must be 5)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user