sed: fix matching of newlines by $

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2013-07-21 22:09:44 +02:00
parent 26cd90c7fd
commit b0e9b72915
2 changed files with 22 additions and 1 deletions

View File

@@ -310,6 +310,27 @@ testing "sed zero chars match/replace logic must not falsely trigger here 2" \
"sed 's/ *$/_/g'" \
"qwerty_\n" "" "qwerty\n"
testing "sed /\$_in_regex/ should not match newlines, only end-of-line" \
"sed ': testcont; /\\\\$/{ =; N; b testcont }'" \
"\
this is a regular line
2
line with \\
continuation
more regular lines
5
line with \\
continuation
" \
"" "\
this is a regular line
line with \\
continuation
more regular lines
line with \\
continuation
"
# testing "description" "commands" "result" "infile" "stdin"
exit $FAILCOUNT