tests: convert "subwrite" test to new framework

* testsuite/misc.pl (Tests): Add subwrite.
* testsuite/subwrite.inp: Likewise.
* testsuite/subwrite.sed: Likewise.
* testsuite/subwrt1.good: Delete file.
* testsuite/subwrt2.good: Delete file.
* testsuite/local.mk (EXTRA_DIST): Remove their names.
(SEDTESTS): Remove "subwrite".
This commit is contained in:
Assaf Gordon committed 2017-05-10 21:37:25 -04:00
1 parent 2f27d079c4
commit 9f521104fa
6 files changed
+18 -16

No files matched your search

-5
View File
@@ -114,7 +114,6 @@ SEDTESTS += testsuite/8bit testsuite/newjis \
testsuite/eval \
testsuite/distrib testsuite/8to7 \
testsuite/bsd testsuite/stdin \
testsuite/subwrite \
testsuite/utf8-1 \
testsuite/utf8-2 testsuite/utf8-3 testsuite/utf8-4 \
testsuite/badenc testsuite/inplace-hold \
@@ -221,10 +220,6 @@ EXTRA_DIST += \
testsuite/noeolw.1good \
testsuite/noeolw.2good \
testsuite/noeolw.sed \
testsuite/subwrite.inp \
testsuite/subwrite.sed \
testsuite/subwrt1.good \
testsuite/subwrt2.good \
testsuite/uniq.good \
testsuite/uniq.inp \
testsuite/uniq.sed \
+18
View File
@@ -1045,6 +1045,24 @@ s,.*[^\/],,
. "//\n"}
],
['subwrite',
# test s///w option
qw(-e 's/you/YoU/w subwrite.wout'),
{IN => "Not some church, and not the state,\n"
. "Not some dark capricious fate.\n"
. "Who you are, and when you lose,\n"
. "Comes only from the things you choose.\n"},
# The expected STDOUT
{OUT => "Not some church, and not the state,\n"
. "Not some dark capricious fate.\n"
. "Who YoU are, and when you lose,\n"
. "Comes only from the things YoU choose.\n"},
# The expected content of 'writeout.wout'
{CMP => [ "Who YoU are, and when you lose,\n"
. "Comes only from the things YoU choose.\n",
{ 'subwrite.wout' => undef }]}
],
['writeout',
# Test 'w' command
qw(-e '/^Facts ar/w writeout.wout'),
-4
View File
@@ -1,4 +0,0 @@
Not some church, and not the state,
Not some dark capricious fate.
Who you are, and when you lose,
Comes only from the things you choose.
-1
View File
@@ -1 +0,0 @@
s/you/YoU/w subwrite.wout
-4
View File
@@ -1,4 +0,0 @@
Not some church, and not the state,
Not some dark capricious fate.
Who YoU are, and when you lose,
Comes only from the things YoU choose.
-2
View File
@@ -1,2 +0,0 @@
Who YoU are, and when you lose,
Comes only from the things YoU choose.