33c33
< # $FreeBSD: head/tools/regression/usr.bin/sed/multitest.t 167549 2007-03-14 11:03:00Z dds $
---
> # $FreeBSD: head/tools/regression/usr.bin/sed/multitest.t 167552 2007-03-14 13:05:45Z dds $
38,40c38,44
< # The following files are created:
< # lines[1-4], script1, script2
< # Two directories *.out contain the test results
---
> # The directory regress.test.out contains the expected test results
> #
> # These are the regression tests created during the development of the
> # BSD sed. The reference file naming scheme used in this script can't
> # handle gracefully the insertion of new tests between existing ones.
> # Therefore, either use the new m4-based regress.t framework, or add
> # tests after the last existing test.
44,49c48
< #BASE=/usr/bin/sed
< BASE=/usr/ports/textproc/gsed/work/sed-4.1.5/sed/sed
< BASELOG=sed.out
< #TEST=`cd ..; make whereobj`/sed
< TEST=/home/dds/src/fbsd-head/sed/sed
< TESTLOG=nsed.out
---
> REGRESS=regress.multitest.out
57c56
< exec 4>&1 5>&2
---
> echo "1..90"
59,68c58,59
< # Set these flags to get messages about known problems
< BSD=0
< GNU=1
< SUN=0
< tests $BASE $BASELOG
<
< BSD=1
< GNU=0
< SUN=0
< tests $TEST $TESTLOG
---
> exec 4>&1 5>&2
> tests
70c61,63
< diff -c $BASELOG $TESTLOG | more
---
>
> # Remove temporary files
> rm -f current.out lines[1-4] script[1-2]
75,79c68,69
< SED=$1
< DIR=$2
< rm -rf $DIR
< mkdir $DIR
< MARK=100
---
> SED=sed
> MARK=0
83d72
< echo Testing commands
89a79,80
> # Handle the result of the last test
> result
91a83,98
> # Display a test's result
> result()
> {
> if [ "$TODO" = '1' ] ; then
> TODO='TODO '
> else
> TODO=''
> fi
> if diff -c $REGRESS/${MARK}_${TESTNAME} current.out ; then
> echo "ok $MARK $TESTNAME # $TODO$COMMENT"
> else
> echo "not ok $MARK $TESTNAME # $TODO$COMMENT"
> fi 1>&4 2>&5
> }
>
> # Mark the beginning of each test
93a101
> [ $MARK -gt 0 ] && result
94a103
> TESTNAME=$1
96,99c105
< exec >"$DIR/${MARK}_$1"
< echo "Test $1:$MARK"
< # Uncomment this line to match tests with sed error messages
< echo "Test $1:$MARK" >&5
---
> exec >"current.out"
103a110
> COMMENT='Argument parsing - first type'
105,106d111
< echo Testing argument parsing
< echo First type
112c117
< echo Second type
---
> COMMENT='Argument parsing - second type'
135,139c140
< if [ $SUN -eq 1 ] ; then
< echo SunOS sed fails this following older POSIX draft
< else
< $SED -e 's/^/e1_/p' -f script1 lines1
< fi
---
> $SED -e 's/^/e1_/p' -f script1 lines1
155c156
< echo Testing address ranges
---
> COMMENT='Address ranges'
182c183
< echo Brace and other grouping
---
> COMMENT='Brace and other grouping'
210c211
< echo Testing a c d and i commands
---
> COMMENT='Commands a c d and i'
254c255
< echo Testing labels and branching
---
> COMMENT='Labels and branching'
325c326
< echo Pattern space commands
---
> COMMENT='Pattern space commands'
337,341c338
< if [ $GNU -eq 1 ] ; then
< echo GNU sed cannot pass 6.3
< else
< $SED -e 'N;N;N;D' lines1
< fi
---
> $SED -e 'N;N;N;D' lines1
358c355
< echo Testing print and file routines
---
> COMMENT='Print and file routines'
367c364
< echo w results
---
> COMMENT='w results'
380,386c377,380
< if [ $BSD -eq 1 ] ; then
< echo BSD sed cannot pass 7.8
< else
< echo line1 > lines3
< echo "" >> lines3
< $SED -n -e '$p' lines3 /dev/null
< fi
---
> echo line1 > lines3
> echo "" >> lines3
> TODO=1
> $SED -n -e '$p' lines3 /dev/null
392c386
< echo Testing substitution commands
---
> COMMENT='Substitution commands'
397,401c391
< if [ $SUN -eq 1 ] ; then
< echo SUN sed fails test 8.3
< else
< $SED -e 's.\..X.g' lines1
< fi
---
> $SED -e 's.\..X.g' lines1
414c404
< echo s wfile results
---
> COMMENT='s wfile results'
< # $FreeBSD: head/tools/regression/usr.bin/sed/multitest.t 167549 2007-03-14 11:03:00Z dds $
---
> # $FreeBSD: head/tools/regression/usr.bin/sed/multitest.t 167552 2007-03-14 13:05:45Z dds $
38,40c38,44
< # The following files are created:
< # lines[1-4], script1, script2
< # Two directories *.out contain the test results
---
> # The directory regress.test.out contains the expected test results
> #
> # These are the regression tests created during the development of the
> # BSD sed. The reference file naming scheme used in this script can't
> # handle gracefully the insertion of new tests between existing ones.
> # Therefore, either use the new m4-based regress.t framework, or add
> # tests after the last existing test.
44,49c48
< #BASE=/usr/bin/sed
< BASE=/usr/ports/textproc/gsed/work/sed-4.1.5/sed/sed
< BASELOG=sed.out
< #TEST=`cd ..; make whereobj`/sed
< TEST=/home/dds/src/fbsd-head/sed/sed
< TESTLOG=nsed.out
---
> REGRESS=regress.multitest.out
57c56
< exec 4>&1 5>&2
---
> echo "1..90"
59,68c58,59
< # Set these flags to get messages about known problems
< BSD=0
< GNU=1
< SUN=0
< tests $BASE $BASELOG
<
< BSD=1
< GNU=0
< SUN=0
< tests $TEST $TESTLOG
---
> exec 4>&1 5>&2
> tests
70c61,63
< diff -c $BASELOG $TESTLOG | more
---
>
> # Remove temporary files
> rm -f current.out lines[1-4] script[1-2]
75,79c68,69
< SED=$1
< DIR=$2
< rm -rf $DIR
< mkdir $DIR
< MARK=100
---
> SED=sed
> MARK=0
83d72
< echo Testing commands
89a79,80
> # Handle the result of the last test
> result
91a83,98
> # Display a test's result
> result()
> {
> if [ "$TODO" = '1' ] ; then
> TODO='TODO '
> else
> TODO=''
> fi
> if diff -c $REGRESS/${MARK}_${TESTNAME} current.out ; then
> echo "ok $MARK $TESTNAME # $TODO$COMMENT"
> else
> echo "not ok $MARK $TESTNAME # $TODO$COMMENT"
> fi 1>&4 2>&5
> }
>
> # Mark the beginning of each test
93a101
> [ $MARK -gt 0 ] && result
94a103
> TESTNAME=$1
96,99c105
< exec >"$DIR/${MARK}_$1"
< echo "Test $1:$MARK"
< # Uncomment this line to match tests with sed error messages
< echo "Test $1:$MARK" >&5
---
> exec >"current.out"
103a110
> COMMENT='Argument parsing - first type'
105,106d111
< echo Testing argument parsing
< echo First type
112c117
< echo Second type
---
> COMMENT='Argument parsing - second type'
135,139c140
< if [ $SUN -eq 1 ] ; then
< echo SunOS sed fails this following older POSIX draft
< else
< $SED -e 's/^/e1_/p' -f script1 lines1
< fi
---
> $SED -e 's/^/e1_/p' -f script1 lines1
155c156
< echo Testing address ranges
---
> COMMENT='Address ranges'
182c183
< echo Brace and other grouping
---
> COMMENT='Brace and other grouping'
210c211
< echo Testing a c d and i commands
---
> COMMENT='Commands a c d and i'
254c255
< echo Testing labels and branching
---
> COMMENT='Labels and branching'
325c326
< echo Pattern space commands
---
> COMMENT='Pattern space commands'
337,341c338
< if [ $GNU -eq 1 ] ; then
< echo GNU sed cannot pass 6.3
< else
< $SED -e 'N;N;N;D' lines1
< fi
---
> $SED -e 'N;N;N;D' lines1
358c355
< echo Testing print and file routines
---
> COMMENT='Print and file routines'
367c364
< echo w results
---
> COMMENT='w results'
380,386c377,380
< if [ $BSD -eq 1 ] ; then
< echo BSD sed cannot pass 7.8
< else
< echo line1 > lines3
< echo "" >> lines3
< $SED -n -e '$p' lines3 /dev/null
< fi
---
> echo line1 > lines3
> echo "" >> lines3
> TODO=1
> $SED -n -e '$p' lines3 /dev/null
392c386
< echo Testing substitution commands
---
> COMMENT='Substitution commands'
397,401c391
< if [ $SUN -eq 1 ] ; then
< echo SUN sed fails test 8.3
< else
< $SED -e 's.\..X.g' lines1
< fi
---
> $SED -e 's.\..X.g' lines1
414c404
< echo s wfile results
---
> COMMENT='s wfile results'