diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-06-29 22:37:55 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-06-29 22:37:55 +0300 |
commit | 9af756aab86e7cc9e549bdcf89aac2425aee8950 (patch) | |
tree | 028cbbcb0fd0116f0102a4e1611be696b31552a5 /test | |
parent | 5cb179dbcfe1503b2eaffa87b5f7502f41482be2 (diff) | |
download | egawk-9af756aab86e7cc9e549bdcf89aac2425aee8950.tar.gz egawk-9af756aab86e7cc9e549bdcf89aac2425aee8950.tar.bz2 egawk-9af756aab86e7cc9e549bdcf89aac2425aee8950.zip |
Typed regex fix, if in an array.
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 | ||||
-rw-r--r-- | test/typedregex3.awk | 11 | ||||
-rw-r--r-- | test/typedregex3.ok | 4 |
6 files changed, 34 insertions, 4 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index c9a8e301..8cc7915e 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,8 +1,9 @@ 2015-06-29 Arnold D. Robbins <arnold@skeeve.com> - * Makefile.am (dbugeval2): New test. + * Makefile.am (dbugeval2, typedregex3): New tests. * dbugeval2.awk, dbugeval2.in, dbugeval2.ok: New files. - Thanks to Hermann Peifer for the report. + * typedregex3.awk, typedregex3.ok: New files. + Thanks to Hermann Peifer for the reports. 2015-06-28 Arnold D. Robbins <arnold@skeeve.com> diff --git a/test/Makefile.am b/test/Makefile.am index f646bc09..b9e14468 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -994,6 +994,8 @@ EXTRA_DIST = \ typedregex1.ok \ typedregex2.awk \ typedregex2.ok \ + typedregex3.awk \ + typedregex3.ok \ typeof1.awk \ typeof1.ok \ typeof2.awk \ @@ -1117,7 +1119,7 @@ GAWK_EXT_TESTS = \ splitarg4 strftime \ strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 \ - typedregex1 typedregex2 typeof1 typeof2 typeof3 typeof4 + typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 timeout EXTRA_TESTS = inftest regtest diff --git a/test/Makefile.in b/test/Makefile.in index 981b6377..0ae51917 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1251,6 +1251,8 @@ EXTRA_DIST = \ typedregex1.ok \ typedregex2.awk \ typedregex2.ok \ + typedregex3.awk \ + typedregex3.ok \ typeof1.awk \ typeof1.ok \ typeof2.awk \ @@ -1373,7 +1375,7 @@ GAWK_EXT_TESTS = \ splitarg4 strftime \ strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 \ - typedregex1 typedregex2 typeof1 typeof2 typeof3 typeof4 + typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 EXTRA_TESTS = inftest regtest INET_TESTS = inetdayu inetdayt inetechu inetecht @@ -3938,6 +3940,11 @@ typedregex2: @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 462128ea..f9dee6d8 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1342,6 +1342,11 @@ typedregex2: @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/typedregex3.awk b/test/typedregex3.awk new file mode 100644 index 00000000..ee6bcb69 --- /dev/null +++ b/test/typedregex3.awk @@ -0,0 +1,11 @@ +BEGIN { + a[1] = @/abc/ + b[1][2][3] = @/xyz/ + print typeof(a[1]), typeof(b[1][2][3]) + print a[1], b[1][2][3] + + a[1]++ + b[1][2][3] "" + print typeof(a[1]), typeof(b[1][2][3]) + print a[1], b[1][2][3] +} diff --git a/test/typedregex3.ok b/test/typedregex3.ok new file mode 100644 index 00000000..9f8b881a --- /dev/null +++ b/test/typedregex3.ok @@ -0,0 +1,4 @@ +regexp regexp +abc xyz +number regexp +1 xyz |