From 2f27d079c461aa78038764dc9f41a0d759b1f7c2 Mon Sep 17 00:00:00 2001 From: Assaf Gordon Date: Thu, 13 Apr 2017 02:23:35 +0000 Subject: [PATCH] tests: convert "writeout" test to new framework * testsuite/misc.pl (Tests): Add writeout. * testsuite/writeout.inp: Likewise. * testsuite/writeout.sed: Likewise. * testsuite/wrtout1.good: Delete file. * testsuite/wrtout2.good: Delete file. * testsuite/local.mk (EXTRA_DIST): Remove their names. (SEDTESTS): Remove "writeout". --- testsuite/local.mk | 6 +----- testsuite/misc.pl | 18 ++++++++++++++++++ testsuite/writeout.inp | 4 ---- testsuite/writeout.sed | 1 - testsuite/wrtout1.good | 4 ---- testsuite/wrtout2.good | 2 -- 6 files changed, 19 insertions(+), 16 deletions(-) delete mode 100644 testsuite/writeout.inp delete mode 100644 testsuite/writeout.sed delete mode 100644 testsuite/wrtout1.good delete mode 100644 testsuite/wrtout2.good diff --git a/testsuite/local.mk b/testsuite/local.mk index 059025d..f056c1a 100644 --- a/testsuite/local.mk +++ b/testsuite/local.mk @@ -114,7 +114,7 @@ SEDTESTS += testsuite/8bit testsuite/newjis \ testsuite/eval \ testsuite/distrib testsuite/8to7 \ testsuite/bsd testsuite/stdin \ - testsuite/subwrite testsuite/writeout \ + testsuite/subwrite \ testsuite/utf8-1 \ testsuite/utf8-2 testsuite/utf8-3 testsuite/utf8-4 \ testsuite/badenc testsuite/inplace-hold \ @@ -243,10 +243,6 @@ EXTRA_DIST += \ testsuite/badenc.good \ testsuite/badenc.inp \ testsuite/badenc.sed \ - testsuite/writeout.inp \ - testsuite/writeout.sed \ - testsuite/wrtout1.good \ - testsuite/wrtout2.good \ testsuite/xemacs.good \ testsuite/xemacs.inp \ testsuite/xemacs.sed diff --git a/testsuite/misc.pl b/testsuite/misc.pl index 1e37b0b..96c0048 100644 --- a/testsuite/misc.pl +++ b/testsuite/misc.pl @@ -1045,6 +1045,24 @@ s,.*[^\/],, . "//\n"} ], + ['writeout', + # Test 'w' command + qw(-e '/^Facts ar/w writeout.wout'), + {IN => "Facts are simple and facts are straight\n" + . "Facts are lazy and facts are late\n" + . "Facts all come with points of view\n" + . "Facts don't do what I want them to\n"}, + # The expected STDOUT + {OUT => "Facts are simple and facts are straight\n" + . "Facts are lazy and facts are late\n" + . "Facts all come with points of view\n" + . "Facts don't do what I want them to\n"}, + # The expected content of 'writeout.wout' + {CMP => [ "Facts are simple and facts are straight\n" + . "Facts are lazy and facts are late\n", + { 'writeout.wout' => undef }]} + ], + ['xabcx', # from the ChangeLog (Fri May 21 1993) # Regex address with custom character (\xREGEXx) diff --git a/testsuite/writeout.inp b/testsuite/writeout.inp deleted file mode 100644 index 1cfceaf..0000000 --- a/testsuite/writeout.inp +++ /dev/null @@ -1,4 +0,0 @@ -Facts are simple and facts are straight -Facts are lazy and facts are late -Facts all come with points of view -Facts don't do what I want them to diff --git a/testsuite/writeout.sed b/testsuite/writeout.sed deleted file mode 100644 index f925a4d..0000000 --- a/testsuite/writeout.sed +++ /dev/null @@ -1 +0,0 @@ -/^Facts ar/w writeout.wout diff --git a/testsuite/wrtout1.good b/testsuite/wrtout1.good deleted file mode 100644 index 1cfceaf..0000000 --- a/testsuite/wrtout1.good +++ /dev/null @@ -1,4 +0,0 @@ -Facts are simple and facts are straight -Facts are lazy and facts are late -Facts all come with points of view -Facts don't do what I want them to diff --git a/testsuite/wrtout2.good b/testsuite/wrtout2.good deleted file mode 100644 index 2ef3f50..0000000 --- a/testsuite/wrtout2.good +++ /dev/null @@ -1,2 +0,0 @@ -Facts are simple and facts are straight -Facts are lazy and facts are late