For the P function, the newline must be considered a part of the pattern
space, so when printing it, don't let the pattern space and the output run into eachother by omitting the \n when printing.
This commit is contained in:
parent
dd281fa589
commit
151740b470
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95169
8
tools/regression/usr.bin/sed/regress.P.out
Normal file
8
tools/regression/usr.bin/sed/regress.P.out
Normal file
@ -0,0 +1,8 @@
|
||||
input
|
||||
input
|
||||
data
|
||||
data
|
||||
for validation
|
||||
for validation
|
||||
of sed(1)
|
||||
of sed(1)
|
@ -9,12 +9,15 @@ cd $TESTDIR
|
||||
|
||||
STATUS=0
|
||||
|
||||
for test in G psl; do
|
||||
for test in G P psl; do
|
||||
echo "Running test $test"
|
||||
case "$test" in
|
||||
G)
|
||||
sed G < regress.in | diff -u regress.$test.out -
|
||||
;;
|
||||
P)
|
||||
sed P < regress.in | diff -u regress.$test.out -
|
||||
;;
|
||||
psl)
|
||||
sed '$!g; P; D' < regress.in | diff -u regress.$test.out -
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user