diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 11 | ||||
-rw-r--r-- | test/Makefile.am | 8 | ||||
-rw-r--r-- | test/Makefile.in | 38 | ||||
-rw-r--r-- | test/Maketests | 30 | ||||
-rw-r--r-- | test/gsubind.awk | 9 | ||||
-rw-r--r-- | test/gsubind.ok | 2 | ||||
-rw-r--r-- | test/typeof1.awk | 6 | ||||
-rw-r--r-- | test/typeof1.ok | 3 | ||||
-rw-r--r-- | test/typeof3.awk | 12 | ||||
-rw-r--r-- | test/typeof3.ok | 3 |
10 files changed, 66 insertions, 56 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 586063e1..40988c56 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -43,6 +43,17 @@ 2016-08-03 Arnold D. Robbins <arnold@skeeve.com> + Restore typed regexp tests. + + * typeof1.awk, typeof1.ok: Adjusted. + * typeof3.awk, typeof3.ok: Adjusted. + * gsubind.awk, gsubind.ok: Adjusted. + * Makefile.am (TYPED_RE_TESTS): Removed. + (dbugtypedre1, dbugtypedre2, typedregex1, typedregex2, + typedregex3): Moved back into regular tests. + +2016-08-03 Arnold D. Robbins <arnold@skeeve.com> + Remove typed regexes until they can be done correctly. * typeof1.awk, typeof1.ok: Adjusted. diff --git a/test/Makefile.am b/test/Makefile.am index c48e8402..035e96ec 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1203,15 +1203,11 @@ UNIX_TESTS = \ fflush getlnhd localenl pid pipeio1 pipeio2 poundbang \ rtlen rtlen01 space strftlng -TYPED_RE_TESTS = \ - dbugtypedre1 dbugtypedre2 \ - typedregex1 typedregex2 typedregex3 - GAWK_EXT_TESTS = \ aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ backw badargs beginfile1 beginfile2 binmode1 charasbytes \ colonwarn clos1way clos1way2 clos1way3 clos1way4 clos1way5 clos1way6 \ - crlf dbugeval dbugeval2 delsub \ + crlf dbugeval dbugeval2 dbugtypedre1 dbugtypedre2 delsub \ devfd devfd1 devfd2 dumpvars errno exit \ fieldwdth forcenum fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \ functab1 functab2 functab3 fwtest fwtest2 fwtest3 \ @@ -1233,7 +1229,7 @@ GAWK_EXT_TESTS = \ splitarg4 strftime \ strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 symtab10 \ - typeof1 typeof2 typeof3 typeof4 \ + typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \ timeout \ watchpoint1 diff --git a/test/Makefile.in b/test/Makefile.in index 415b36eb..d96343b0 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1459,15 +1459,11 @@ UNIX_TESTS = \ fflush getlnhd localenl pid pipeio1 pipeio2 poundbang \ rtlen rtlen01 space strftlng -TYPED_RE_TESTS = \ - dbugtypedre1 dbugtypedre2 \ - typedregex1 typedregex2 typedregex3 - GAWK_EXT_TESTS = \ aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ backw badargs beginfile1 beginfile2 binmode1 charasbytes \ colonwarn clos1way clos1way2 clos1way3 clos1way4 clos1way5 clos1way6 \ - crlf dbugeval dbugeval2 delsub \ + crlf dbugeval dbugeval2 dbugtypedre1 dbugtypedre2 delsub \ devfd devfd1 devfd2 dumpvars errno exit \ fieldwdth forcenum fpat1 fpat2 fpat3 fpat4 fpat5 fpatnull fsfwfs funlen \ functab1 functab2 functab3 fwtest fwtest2 fwtest3 \ @@ -1489,7 +1485,7 @@ GAWK_EXT_TESTS = \ splitarg4 strftime \ strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 symtab10 \ - typeof1 typeof2 typeof3 typeof4 \ + typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \ timeout \ watchpoint1 @@ -3834,21 +3830,6 @@ getlnhd: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -typedregex1: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -typedregex2: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -typedregex3: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - aadelete1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -4299,6 +4280,21 @@ symtab7: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +typedregex1: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typedregex2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typedregex3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + typeof1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index ebdf6901..7a5acf50 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1032,21 +1032,6 @@ getlnhd: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -typedregex1: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -typedregex2: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -typedregex3: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - aadelete1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1497,6 +1482,21 @@ symtab7: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +typedregex1: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typedregex2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +typedregex3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + typeof1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/gsubind.awk b/test/gsubind.awk index fec6cbc6..fce0d818 100644 --- a/test/gsubind.awk +++ b/test/gsubind.awk @@ -1,10 +1,9 @@ BEGIN { f = "foo" -# p = @/o/ -p = "o" + p = @/o/ gsub(p, "q", f) print f -# fun = "gsub" -# @fun(p, "q", f) -# print f + fun = "gsub" + @fun(p, "q", f) + print f } diff --git a/test/gsubind.ok b/test/gsubind.ok index ca6662e5..d25f018a 100644 --- a/test/gsubind.ok +++ b/test/gsubind.ok @@ -1 +1,3 @@ fqq +gawk: gsubind.awk:7: fatal: gsub: can be called indirectly only with two arguments +EXIT CODE: 2 diff --git a/test/typeof1.awk b/test/typeof1.awk index 9db64484..c301030e 100644 --- a/test/typeof1.awk +++ b/test/typeof1.awk @@ -1,9 +1,9 @@ BEGIN { a = 5 ; print typeof(a) print typeof(b) -# print typeof(@/foo/) + print typeof(@/foo/) c = "foo" ; print typeof(c) d[1] = 1 ; print typeof(d), typeof(d[1]) -# e = @/foo/ ; print typeof(e) -# print typeof(@/bar/) + e = @/foo/ ; print typeof(e) + print typeof(@/bar/) } diff --git a/test/typeof1.ok b/test/typeof1.ok index c172da5e..132cc24e 100644 --- a/test/typeof1.ok +++ b/test/typeof1.ok @@ -1,4 +1,7 @@ number untyped +regexp string array number +regexp +regexp diff --git a/test/typeof3.awk b/test/typeof3.awk index e31bf602..d148f373 100644 --- a/test/typeof3.awk +++ b/test/typeof3.awk @@ -1,13 +1,13 @@ -#BEGIN { -# x = @/xx/ -# print typeof(x) -# print x -#} +BEGIN { + x = @/xx/ + print typeof(x) + print x +} # this set may not really be needed for the test BEGIN { x = 4 -# print typeof(@/xxx/) + print typeof(@/xxx/) print typeof(3) print x } diff --git a/test/typeof3.ok b/test/typeof3.ok index 9a897048..a6cd6c4a 100644 --- a/test/typeof3.ok +++ b/test/typeof3.ok @@ -1,3 +1,6 @@ +regexp +xx +regexp number 4 number |