From 151740b470d9f2c0e7e517add53173e0945a232d Mon Sep 17 00:00:00 2001 From: Juli Mallett Date: Sun, 21 Apr 2002 01:27:05 +0000 Subject: [PATCH] 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. --- tools/regression/usr.bin/sed/regress.P.out | 8 ++++++++ tools/regression/usr.bin/sed/regress.sh | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 tools/regression/usr.bin/sed/regress.P.out diff --git a/tools/regression/usr.bin/sed/regress.P.out b/tools/regression/usr.bin/sed/regress.P.out new file mode 100644 index 000000000000..4d3284f8bdd2 --- /dev/null +++ b/tools/regression/usr.bin/sed/regress.P.out @@ -0,0 +1,8 @@ +input +input +data +data +for validation +for validation +of sed(1) +of sed(1) diff --git a/tools/regression/usr.bin/sed/regress.sh b/tools/regression/usr.bin/sed/regress.sh index 10cc0016ae77..9198b3ffcf7f 100644 --- a/tools/regression/usr.bin/sed/regress.sh +++ b/tools/regression/usr.bin/sed/regress.sh @@ -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 - ;;