summaryrefslogtreecommitdiff
path: root/testsuite/misc.pl
diff options
context:
space:
mode:
authorAssaf Gordon <assafgordon@gmail.com>2017-04-28 20:26:10 -0400
committerAssaf Gordon <assafgordon@gmail.com>2017-05-10 21:39:57 -0400
commitb85182196acfc99a524c0a17528efad073966aeb (patch)
tree7582d81756f5ad2b85c915e38f0837274db20e6e /testsuite/misc.pl
parent0ea46106d3abbae745eddb3ab2d43d1a61c2c3c2 (diff)
downloadsed-b85182196acfc99a524c0a17528efad073966aeb.tar.gz
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".
Diffstat (limited to 'testsuite/misc.pl')
-rw-r--r--testsuite/misc.pl56
1 files changed, 56 insertions, 0 deletions
diff --git a/testsuite/misc.pl b/testsuite/misc.pl
index aee00f6..fa1e48e 100644
--- a/testsuite/misc.pl
+++ b/testsuite/misc.pl
@@ -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(