From 50b7d92baba0279ca6c4b2c6df4b45fa88172acc Mon Sep 17 00:00:00 2001 From: Assaf Gordon Date: Thu, 13 Apr 2017 02:00:29 +0000 Subject: [PATCH] tests: convert 'quiet'/'file' tests to new framework * testsuite/local.mk: (SEDTESTS): Remove tests. * testsuite/misc.pl: Add tests. --- testsuite/local.mk | 4 ++-- testsuite/misc.pl | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/testsuite/local.mk b/testsuite/local.mk index 57f2748..059025d 100644 --- a/testsuite/local.mk +++ b/testsuite/local.mk @@ -118,8 +118,8 @@ SEDTESTS += testsuite/8bit testsuite/newjis \ testsuite/utf8-1 \ testsuite/utf8-2 testsuite/utf8-3 testsuite/utf8-4 \ testsuite/badenc testsuite/inplace-hold \ - testsuite/help testsuite/file \ - testsuite/quiet testsuite/binary3 \ + testsuite/help \ + testsuite/binary3 \ testsuite/binary2 testsuite/binary testsuite/dc # Note that the first lines are statements. They ensure that environment diff --git a/testsuite/misc.pl b/testsuite/misc.pl index 2dee448..1e37b0b 100644 --- a/testsuite/misc.pl +++ b/testsuite/misc.pl @@ -199,6 +199,38 @@ s/[[[[[[[[[]/h/ . ": \${ac_cv_prog_CPP='/usr/bin/cpp'}\n"} ], + ['quiet', + # the old 'quiet' test: --quiet instead of -n + qw(--quiet -f), + {IN => q|s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p|}, + {IN => "_cv_=emptyvar\n" + . "ac_cv_prog_RANLIB=/usr/bin/ranlib\n" + . "ac_cv_prog_CC=/usr/unsupported/\ \ /lib/_cv_/cc\n" + . "ac_cv_prog_CPP=/usr/bin/cpp\n" + . "SHELL=bash\n" + . "GNU=GNU!UNIX\n"}, + {OUT => ": \${_cv_='emptyvar'}\n" + . ": \${ac_cv_prog_RANLIB='/usr/bin/ranlib'}\n" + . ": \${ac_cv_prog_CC='/usr/unsupported/\ \ /lib/_cv_/cc'}\n" + . ": \${ac_cv_prog_CPP='/usr/bin/cpp'}\n"} + ], + + ['file', + # the old 'file' test: --file instead of -f + qw(-n --file), + {IN => q|s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p|}, + {IN => "_cv_=emptyvar\n" + . "ac_cv_prog_RANLIB=/usr/bin/ranlib\n" + . "ac_cv_prog_CC=/usr/unsupported/\ \ /lib/_cv_/cc\n" + . "ac_cv_prog_CPP=/usr/bin/cpp\n" + . "SHELL=bash\n" + . "GNU=GNU!UNIX\n"}, + {OUT => ": \${_cv_='emptyvar'}\n" + . ": \${ac_cv_prog_RANLIB='/usr/bin/ranlib'}\n" + . ": \${ac_cv_prog_CC='/usr/unsupported/\ \ /lib/_cv_/cc'}\n" + . ": \${ac_cv_prog_CPP='/usr/bin/cpp'}\n"} + ], + ['dollar', # Test replacement on the last line (address '$')