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
2ef068fe8d
commit
3881ce8d9c
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…
x
Reference in New Issue
Block a user