1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

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:
Juli Mallett 2002-04-21 01:27:05 +00:00
parent dd281fa589
commit 151740b470
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95169
2 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,8 @@
input
input
data
data
for validation
for validation
of sed(1)
of sed(1)

View File

@ -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 -
;;