From 0280fb2bc073db6c5812fb8e40550626eaf602d3 Mon Sep 17 00:00:00 2001 From: Assaf Gordon Date: Mon, 10 Apr 2017 03:02:58 +0000 Subject: [PATCH] tests: convert "fasts" test to new framework * testsuite/misc.pl (Tests): Add fasts. * testsuite/fasts.good: Delete file. * testsuite/fasts.inp: Likewise. * testsuite/fasts.sed: Likewise. * testsuite/local.mk (EXTRA_DIST): Remove their names. (SEDTESTS): Remove "fasts". --- testsuite/fasts.good | 14 ---------- testsuite/fasts.inp | 1 - testsuite/fasts.sed | 43 ------------------------------ testsuite/local.mk | 5 +--- testsuite/misc.pl | 63 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 64 insertions(+), 62 deletions(-) delete mode 100644 testsuite/fasts.good delete mode 100644 testsuite/fasts.inp delete mode 100644 testsuite/fasts.sed diff --git a/testsuite/fasts.good b/testsuite/fasts.good deleted file mode 100644 index d1c7e4a..0000000 --- a/testsuite/fasts.good +++ /dev/null @@ -1,14 +0,0 @@ -aaaaaabbbbbbaaaaaaa -bbbbbb -aaaaaabbbbbbaaaaaaa -aaaaaabbbbbbaaaaaaa -aaaaaaabbbbbbaaaaaaa -aaaaaabbbbbbaaaaaaa -aaaaaaabbbbbbaaaaaa -bbbbbbbbbbbbbbbbbbb - -bbbbbbbbbbbbbbbbbbb -bbbbbbbbbbbbbbbbbbb -bbbbbbbbbbbbbbbbbbb -bbbbbbbbbbbbbbbbbbb -bbbbbbbbbbbbbbbbbbbb diff --git a/testsuite/fasts.inp b/testsuite/fasts.inp deleted file mode 100644 index 361e17b..0000000 --- a/testsuite/fasts.inp +++ /dev/null @@ -1 +0,0 @@ -aaaaaaabbbbbbaaaaaaa diff --git a/testsuite/fasts.sed b/testsuite/fasts.sed deleted file mode 100644 index fb5161b..0000000 --- a/testsuite/fasts.sed +++ /dev/null @@ -1,43 +0,0 @@ -# test `fast' substitutions - -h -s/a// -p -g -s/a//g -p -g -s/^a//p -g -s/^a//g -p -g -s/not present//g -p -g -s/^[a-z]//g -p -g -s/a$// -p -g - -y/a/b/ -h -s/b// -p -g -s/b//g -p -g -s/^b//p -g -s/^b//g -p -g -s/^[a-z]//g -p -g -s/b$// -p -g diff --git a/testsuite/local.mk b/testsuite/local.mk index 94ace53..1974c64 100644 --- a/testsuite/local.mk +++ b/testsuite/local.mk @@ -113,7 +113,7 @@ SEDTESTS += testsuite/sep \ testsuite/numsub5 \ testsuite/madding testsuite/mac-mf \ testsuite/xemacs \ - testsuite/fasts testsuite/uniq testsuite/manis \ + testsuite/uniq testsuite/manis \ testsuite/khadafy testsuite/linecnt testsuite/eval \ testsuite/distrib testsuite/8to7 \ testsuite/middle \ @@ -218,9 +218,6 @@ EXTRA_DIST += \ testsuite/factor.good \ testsuite/factor.inp \ testsuite/factor.sed \ - testsuite/fasts.good \ - testsuite/fasts.inp \ - testsuite/fasts.sed \ testsuite/flipcase.good \ testsuite/flipcase.inp \ testsuite/flipcase.sed \ diff --git a/testsuite/misc.pl b/testsuite/misc.pl index a14e6bb..8aef69a 100644 --- a/testsuite/misc.pl +++ b/testsuite/misc.pl @@ -207,6 +207,69 @@ q)}, . "wollybears-in-minnesota\n"} ], + ['fasts', + # test `fast' substitutions + qw(-f), + {IN => q( +h +s/a// +p +g +s/a//g +p +g +s/^a//p +g +s/^a//g +p +g +s/not present//g +p +g +s/^[a-z]//g +p +g +s/a$// +p +g + +y/a/b/ +h +s/b// +p +g +s/b//g +p +g +s/^b//p +g +s/^b//g +p +g +s/^[a-z]//g +p +g +s/b$// +p +g +)}, + {IN => "aaaaaaabbbbbbaaaaaaa\n"}, + {OUT => "aaaaaabbbbbbaaaaaaa\n" + . "bbbbbb\n" + . "aaaaaabbbbbbaaaaaaa\n" + . "aaaaaabbbbbbaaaaaaa\n" + . "aaaaaaabbbbbbaaaaaaa\n" + . "aaaaaabbbbbbaaaaaaa\n" + . "aaaaaaabbbbbbaaaaaa\n" + . "bbbbbbbbbbbbbbbbbbb\n" + . "\n" + . "bbbbbbbbbbbbbbbbbbb\n" + . "bbbbbbbbbbbbbbbbbbb\n" + . "bbbbbbbbbbbbbbbbbbb\n" + . "bbbbbbbbbbbbbbbbbbb\n" + . "bbbbbbbbbbbbbbbbbbbb\n"} + ], + ['xabcx', # from the ChangeLog (Fri May 21 1993) # Regex address with custom character (\xREGEXx)