diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-08-03 21:38:50 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-08-03 21:38:50 +0300 |
commit | f591d307d9af95bfa0ccda4d5eb76a674447ba39 (patch) | |
tree | 65c8e2259634653566fc2c49ec996ff416330361 /test | |
parent | 9907a598dca8f129422c42f8c4fa3b4e2c988221 (diff) | |
download | egawk-f591d307d9af95bfa0ccda4d5eb76a674447ba39.tar.gz egawk-f591d307d9af95bfa0ccda4d5eb76a674447ba39.tar.bz2 egawk-f591d307d9af95bfa0ccda4d5eb76a674447ba39.zip |
Restore typed regexp code in a new branch.
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 17367572..a529cca6 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,5 +1,16 @@ 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 67485455..3ac9ee70 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1190,15 +1190,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 \ @@ -1220,7 +1216,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 8df786d2..07989791 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1446,15 +1446,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 \ @@ -1476,7 +1472,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 @@ -3794,21 +3790,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: $$? >>_$@ @@ -4259,6 +4240,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 b28a32ab..951590ac 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1017,21 +1017,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: $$? >>_$@ @@ -1482,6 +1467,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 |