diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/Makefile.in | 9 | ||||
-rw-r--r-- | test/Maketests | 5 | ||||
-rwxr-xr-x | test/negrange.awk | 7 | ||||
-rw-r--r-- | test/negrange.ok | 7 |
6 files changed, 35 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 0f380b08..e1b9f908 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +Mon Feb 7 21:39:39 2011 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (negrange): New test. + * negrange.awk, negrange.ok: New files. + Tue Feb 1 23:21:39 2011 Arnold D. Robbins <arnold@skeeve.com> * xref.awk: Change sort command to just "sort"; avoids diff --git a/test/Makefile.am b/test/Makefile.am index 27876090..fb84ca13 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -407,6 +407,8 @@ EXTRA_DIST = \ nasty2.ok \ negexp.awk \ negexp.ok \ + negrange.awk \ + negrange.ok \ nested.awk \ nested.in \ nested.ok \ @@ -736,7 +738,7 @@ BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \ getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest gsubtst2 \ gsubtst3 gsubtst4 gsubtst5 gsubtst6 hex hsprint inputred intest intprec iobug1 \ leaddig leadnl litoct longsub longwrds manglprm math membug1 messages \ - minusstr mmap8k mtchi18n nasty nasty2 negexp nested nfldstr nfneg \ + minusstr mmap8k mtchi18n nasty nasty2 negexp negrange nested nfldstr nfneg \ nfset nlfldsep nlinstr nlstrina noeffect nofile nofmtch noloop1 \ noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \ ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf paramdup paramres \ diff --git a/test/Makefile.in b/test/Makefile.in index d035ef22..d1ade6ca 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -592,6 +592,8 @@ EXTRA_DIST = \ nasty2.ok \ negexp.awk \ negexp.ok \ + negrange.awk \ + negrange.ok \ nested.awk \ nested.in \ nested.ok \ @@ -921,7 +923,7 @@ BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 \ getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest gsubtst2 \ gsubtst3 gsubtst4 gsubtst5 gsubtst6 hex hsprint inputred intest intprec iobug1 \ leaddig leadnl litoct longsub longwrds manglprm math membug1 messages \ - minusstr mmap8k mtchi18n nasty nasty2 negexp nested nfldstr nfneg \ + minusstr mmap8k mtchi18n nasty nasty2 negexp negrange nested nfldstr nfneg \ nfset nlfldsep nlinstr nlstrina noeffect nofile nofmtch noloop1 \ noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \ ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf paramdup paramres \ @@ -2089,6 +2091,11 @@ negexp: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +negrange: + @echo negrange + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + nested: @echo nested @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index c0222139..4872a504 100644 --- a/test/Maketests +++ b/test/Maketests @@ -420,6 +420,11 @@ negexp: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +negrange: + @echo negrange + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + nested: @echo nested @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/negrange.awk b/test/negrange.awk new file mode 100755 index 00000000..d70f7308 --- /dev/null +++ b/test/negrange.awk @@ -0,0 +1,7 @@ +BEGIN {
+ s = "Volume 8, Numbers 1-2 / January 1971"
+ n = split(s, parts, "[^-A-Za-z0-9]+")
+ print "n =", n
+ for (i = 1; i <= n; i++)
+ printf("s[%d] = \"%s\"\n", i, parts[i])
+}
diff --git a/test/negrange.ok b/test/negrange.ok new file mode 100644 index 00000000..57f4c8e2 --- /dev/null +++ b/test/negrange.ok @@ -0,0 +1,7 @@ +n = 6 +s[1] = "Volume" +s[2] = "8" +s[3] = "Numbers" +s[4] = "1-2" +s[5] = "January" +s[6] = "1971" |