summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-04-21 01:27:05 +0000
committerjmallett <jmallett@FreeBSD.org>2002-04-21 01:27:05 +0000
commit3881ce8d9cdfa95c64777d7ca9506a825dfdd6a3 (patch)
treea2248109c89a45f152ac68a6422512456d281e24 /tools
parent2ef068fe8da60a604ce69209289f8ca0a5c1e5be (diff)
downloadFreeBSD-src-3881ce8d9cdfa95c64777d7ca9506a825dfdd6a3.zip
FreeBSD-src-3881ce8d9cdfa95c64777d7ca9506a825dfdd6a3.tar.gz
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.
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/usr.bin/sed/regress.P.out8
-rw-r--r--tools/regression/usr.bin/sed/regress.sh5
2 files changed, 12 insertions, 1 deletions
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 0000000..4d3284f
--- /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 10cc001..9198b3f 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 -
;;
OpenPOWER on IntegriCloud