tests: convert "noeolw" test to new framework
* testsuite/misc.pl (Tests): Add noeolw. * testsuite/noeolw.good: Delete file. * testsuite/noeolw.1good: Likewise. * testsuite/noeolw.2good: Likewise * testsuite/noeolw.inp: Likewise. * testsuite/noeolw.sed: Likewise. * testsuite/local.mk (EXTRA_DIST): Remove their names. (SEDTESTS): Remove "noeolw".
This commit is contained in:
1 parent
0ea46106d3
commit
b85182196a
7 files changed
+56
-43
No files matched your search
@@ -123,9 +123,6 @@ check_PROGRAMS += testsuite/bug-regex7 \
|
||||
testsuite/runptests testsuite/tst-rxspencer testsuite/tst-regex2
|
||||
endif
|
||||
|
||||
SEDTESTS += testsuite/noeolw
|
||||
|
||||
|
||||
# Note that the first lines are statements. They ensure that environment
|
||||
# variables that can perturb tests are unset or set to expected values.
|
||||
# The rest are envvar settings that propagate build-related Makefile
|
||||
@@ -203,11 +200,6 @@ EXTRA_DIST += \
|
||||
testsuite/madding.good \
|
||||
testsuite/madding.inp \
|
||||
testsuite/madding.sed \
|
||||
testsuite/noeolw.good \
|
||||
testsuite/noeolw.inp \
|
||||
testsuite/noeolw.1good \
|
||||
testsuite/noeolw.2good \
|
||||
testsuite/noeolw.sed \
|
||||
testsuite/uniq.good \
|
||||
testsuite/uniq.inp \
|
||||
testsuite/uniq.sed \
|
||||
|
||||
@@ -940,6 +940,62 @@ s/$/Y/mg
|
||||
. "XcYY\n"}
|
||||
],
|
||||
|
||||
['noeolw',
|
||||
qw(-n -f),
|
||||
# The sed program:
|
||||
# generates two output files (in addition to STDOUT)
|
||||
{IN => q(w noeolw.1out
|
||||
$ {
|
||||
x
|
||||
w noeolw.1out
|
||||
x
|
||||
}
|
||||
h
|
||||
1,3w noeolw.2out
|
||||
p
|
||||
p
|
||||
)},
|
||||
# The input file (was: noeolw.inp).
|
||||
# NOTE: in the old test, the input file was given twice.
|
||||
# here we specify two (identical) input files.
|
||||
{IN => "This file is unique\n" .
|
||||
"in that it does\n" .
|
||||
"end in a newline."},
|
||||
{IN => "This file is unique\n" .
|
||||
"in that it does\n" .
|
||||
"end in a newline."},
|
||||
|
||||
# The expected STDOUT (was: noeolw.good)
|
||||
{OUT => "This file is unique\n" .
|
||||
"This file is unique\n" .
|
||||
"in that it does\n" .
|
||||
"in that it does\n" .
|
||||
"end in a newline.\n" .
|
||||
"end in a newline.\n" .
|
||||
"This file is unique\n" .
|
||||
"This file is unique\n" .
|
||||
"in that it does\n" .
|
||||
"in that it does\n" .
|
||||
"end in a newline.\n" .
|
||||
"end in a newline."},
|
||||
|
||||
# The expected content of 'noeolw.1out' (was: noeolw.1good)
|
||||
{CMP => [ "This file is unique\n" .
|
||||
"in that it does\n" .
|
||||
"end in a newline.\n" .
|
||||
"This file is unique\n" .
|
||||
"in that it does\n" .
|
||||
"end in a newline.\n" .
|
||||
"in that it does\n",
|
||||
{ 'noeolw.1out' => undef }]},
|
||||
|
||||
# The expected content of 'noeolw.2out' (was: noeolw.2good)
|
||||
{CMP => [ "This file is unique\n" .
|
||||
"in that it does\n" .
|
||||
"end in a newline.",
|
||||
{ 'noeolw.2out' => undef }]},
|
||||
],
|
||||
|
||||
['numsub',
|
||||
qw(-f),
|
||||
{IN => q(
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
This file is unique
|
||||
in that it does
|
||||
end in a newline.
|
||||
This file is unique
|
||||
in that it does
|
||||
end in a newline.
|
||||
in that it does
|
||||
@@ -1,3 +0,0 @@
|
||||
This file is unique
|
||||
in that it does
|
||||
end in a newline.
|
||||
@@ -1,12 +0,0 @@
|
||||
This file is unique
|
||||
This file is unique
|
||||
in that it does
|
||||
in that it does
|
||||
end in a newline.
|
||||
end in a newline.
|
||||
This file is unique
|
||||
This file is unique
|
||||
in that it does
|
||||
in that it does
|
||||
end in a newline.
|
||||
end in a newline.
|
||||
@@ -1,3 +0,0 @@
|
||||
This file is unique
|
||||
in that it does
|
||||
end in a newline.
|
||||
@@ -1,10 +0,0 @@
|
||||
w noeolw.1out
|
||||
$ {
|
||||
x
|
||||
w noeolw.1out
|
||||
x
|
||||
}
|
||||
h
|
||||
1,3w noeolw.2out
|
||||
p
|
||||
p
|
||||
Reference in new issue
Block a user