mirror of
https://github.com/sheumann/hush.git
synced 2024-08-20 04:28:57 +00:00
sed: n cmd must reset "we had successful subst" flag. closes bug 1214.
This commit is contained in:
parent
cd174d1f31
commit
f39c7c0c86
@ -1053,6 +1053,7 @@ restart:
|
||||
pattern_space = next_line;
|
||||
last_gets_char = next_gets_char;
|
||||
next_line = get_next_line(&next_gets_char);
|
||||
substituted = 0;
|
||||
linenum++;
|
||||
break;
|
||||
}
|
||||
|
@ -201,4 +201,10 @@ testing "sed s/xxx/[/" "sed -e 's/xxx/[/'" "[\n" "" "xxx\n"
|
||||
#testing "sed -g (exhaustive)" "sed -e 's/[[:space:]]*/,/g'" ",1,2,3,4,5," \
|
||||
# "" "12345"
|
||||
|
||||
# testing "description" "arguments" "result" "infile" "stdin"
|
||||
|
||||
testing "sed n command must reset 'substituted' bit" \
|
||||
"sed 's/1/x/;T;n;: next;s/3/y/;t quit;n;b next;: quit;q'" \
|
||||
"0\nx\n2\ny\n" "" "0\n1\n2\n3\n"
|
||||
|
||||
exit $FAILCOUNT
|
||||
|
Loading…
Reference in New Issue
Block a user