diff --git a/testsuite/local.mk b/testsuite/local.mk index f056c1a..77131b2 100644 --- a/testsuite/local.mk +++ b/testsuite/local.mk @@ -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 \ diff --git a/testsuite/misc.pl b/testsuite/misc.pl index 96c0048..aee00f6 100644 --- a/testsuite/misc.pl +++ b/testsuite/misc.pl @@ -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'), diff --git a/testsuite/subwrite.inp b/testsuite/subwrite.inp deleted file mode 100644 index 3e910cc..0000000 --- a/testsuite/subwrite.inp +++ /dev/null @@ -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. diff --git a/testsuite/subwrite.sed b/testsuite/subwrite.sed deleted file mode 100644 index 1a4a01d..0000000 --- a/testsuite/subwrite.sed +++ /dev/null @@ -1 +0,0 @@ -s/you/YoU/w subwrite.wout diff --git a/testsuite/subwrt1.good b/testsuite/subwrt1.good deleted file mode 100644 index 560b698..0000000 --- a/testsuite/subwrt1.good +++ /dev/null @@ -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. diff --git a/testsuite/subwrt2.good b/testsuite/subwrt2.good deleted file mode 100644 index c87bb68..0000000 --- a/testsuite/subwrt2.good +++ /dev/null @@ -1,2 +0,0 @@ -Who YoU are, and when you lose, -Comes only from the things YoU choose.