diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/Makefile.am | 21 | ||||
-rw-r--r-- | test/Makefile.in | 26 | ||||
-rw-r--r-- | test/Maketests | 5 | ||||
-rw-r--r-- | test/fpat2.awk | 11 | ||||
-rw-r--r-- | test/fpat2.ok | 3 |
6 files changed, 53 insertions, 18 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 0d4be5f3..f28153ab 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +Thu May 26 22:08:27 2011 Arnold D. Robbins <arnold@skeeve.com> + + * fpat2.awk, fpat2.ok: New files. Thanks to Pat Rankin for the cases. + * Makefile.am (fpat2): New test. + Mon May 23 14:03:15 2011 Arnold D. Robbins <arnold@skeeve.com> * fpatnull.awk, fpatnull.in, fpatnull.ok: New files. diff --git a/test/Makefile.am b/test/Makefile.am index fd34a059..065bff1d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -226,6 +226,8 @@ EXTRA_DIST = \ fpat1.awk \ fpat1.in \ fpat1.ok \ + fpat2.awk \ + fpat2.ok \ fpatnull.awk \ fpatnull.in \ fpatnull.ok \ @@ -782,15 +784,16 @@ UNIX_TESTS = \ fflush getlnhd localenl pid pipeio1 pipeio2 poundbang space strftlng GAWK_EXT_TESTS = \ - aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort backw \ - badargs beginfile1 binmode1 clos1way delsub devfd devfd1 devfd2 \ - dumpvars exit fieldwdth fpat1 fpatnull fsfwfs funlen fwtest fwtest2 \ - gensub gensub2 getlndir gnuops2 gnuops3 gnureops icasefs icasers \ - igncdym igncfs ignrcas2 ignrcase indirectcall lint lintold lintwarn \ - manyfiles match1 match2 match3 mbstr1 nastyparm next nondec nondec2 \ - patsplit posix printfbad1 printfbad2 procinfs profile1 profile2 \ - profile3 rebuf regx8bit reint reint2 rsstart1 rsstart2 rsstart3 \ - rstest6 shadow sortfor sortu splitarg4 strftime strtonum switch2 + aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ + backw badargs beginfile1 binmode1 clos1way delsub devfd devfd1 \ + devfd2 dumpvars exit fieldwdth fpat1 fpat2 fpatnull fsfwfs funlen \ + fwtest fwtest2 gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ + icasefs icasers igncdym igncfs ignrcas2 ignrcase indirectcall lint \ + lintold lintwarn manyfiles match1 match2 match3 mbstr1 nastyparm \ + next nondec nondec2 patsplit posix printfbad1 printfbad2 procinfs \ + profile1 profile2 profile3 rebuf regx8bit reint reint2 rsstart1 \ + rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ + strtonum switch2 EXTRA_TESTS = inftest regtest diff --git a/test/Makefile.in b/test/Makefile.in index 734f97a8..1fa42e36 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -411,6 +411,8 @@ EXTRA_DIST = \ fpat1.awk \ fpat1.in \ fpat1.ok \ + fpat2.awk \ + fpat2.ok \ fpatnull.awk \ fpatnull.in \ fpatnull.ok \ @@ -967,15 +969,16 @@ UNIX_TESTS = \ fflush getlnhd localenl pid pipeio1 pipeio2 poundbang space strftlng GAWK_EXT_TESTS = \ - aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort backw \ - badargs beginfile1 binmode1 clos1way delsub devfd devfd1 devfd2 \ - dumpvars exit fieldwdth fpat1 fpatnull fsfwfs funlen fwtest fwtest2 \ - gensub gensub2 getlndir gnuops2 gnuops3 gnureops icasefs icasers \ - igncdym igncfs ignrcas2 ignrcase indirectcall lint lintold lintwarn \ - manyfiles match1 match2 match3 mbstr1 nastyparm next nondec nondec2 \ - patsplit posix printfbad1 printfbad2 procinfs profile1 profile2 \ - profile3 rebuf regx8bit reint reint2 rsstart1 rsstart2 rsstart3 \ - rstest6 shadow sortfor sortu splitarg4 strftime strtonum switch2 + aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ + backw badargs beginfile1 binmode1 clos1way delsub devfd devfd1 \ + devfd2 dumpvars exit fieldwdth fpat1 fpat2 fpatnull fsfwfs funlen \ + fwtest fwtest2 gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ + icasefs icasers igncdym igncfs ignrcas2 ignrcase indirectcall lint \ + lintold lintwarn manyfiles match1 match2 match3 mbstr1 nastyparm \ + next nondec nondec2 patsplit posix printfbad1 printfbad2 procinfs \ + profile1 profile2 profile3 rebuf regx8bit reint reint2 rsstart1 \ + rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ + strtonum switch2 EXTRA_TESTS = inftest regtest INET_TESTS = inetdayu inetdayt inetechu inetecht @@ -2624,6 +2627,11 @@ fpat1: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +fpat2: + @echo fpat2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + fpatnull: @echo fpatnull @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 4e419a5c..7577b893 100644 --- a/test/Maketests +++ b/test/Maketests @@ -905,6 +905,11 @@ fpat1: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +fpat2: + @echo fpat2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + fpatnull: @echo fpatnull @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/fpat2.awk b/test/fpat2.awk new file mode 100644 index 00000000..aa9e6be5 --- /dev/null +++ b/test/fpat2.awk @@ -0,0 +1,11 @@ +BEGIN { + FPAT = " " + $0 = "" + print NF + + $0 = "abc" + print NF + + $0 = "a b c" + print NF +} diff --git a/test/fpat2.ok b/test/fpat2.ok new file mode 100644 index 00000000..67bbf9c5 --- /dev/null +++ b/test/fpat2.ok @@ -0,0 +1,3 @@ +0 +0 +2 |