diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 6 | ||||
-rw-r--r-- | test/Makefile.am | 6 | ||||
-rw-r--r-- | test/Makefile.in | 11 | ||||
-rw-r--r-- | test/Maketests | 5 | ||||
-rw-r--r-- | test/typeof5.awk | 10 | ||||
-rw-r--r-- | test/typeof5.in | 1 | ||||
-rw-r--r-- | test/typeof5.ok | 4 |
7 files changed, 41 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 3566cce7..fc7358e1 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2017-02-17 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (typeof5): New test. + * typeof5.awk, typeof5.in, typeof5.ok: New files. + Thanks to Andrew Schorr for part of the tests. + 2017-01-27 Andrew J. Schorr <aschorr@telemetry-investments.com> * Makefile.am (gensub3): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 9f79df8f..7715c39d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1110,6 +1110,9 @@ EXTRA_DIST = \ typeof3.ok \ typeof4.awk \ typeof4.ok \ + typeof5.awk \ + typeof5.in \ + typeof5.ok \ uninit2.awk \ uninit2.ok \ uninit3.awk \ @@ -1234,7 +1237,8 @@ GAWK_EXT_TESTS = \ splitarg4 strftime \ strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 symtab10 \ - typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \ + typedregex1 typedregex2 typedregex3 \ + typeof1 typeof2 typeof3 typeof4 typeof5 \ timeout \ watchpoint1 diff --git a/test/Makefile.in b/test/Makefile.in index 1cd8bf15..88b731b2 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1368,6 +1368,9 @@ EXTRA_DIST = \ typeof3.ok \ typeof4.awk \ typeof4.ok \ + typeof5.awk \ + typeof5.in \ + typeof5.ok \ uninit2.awk \ uninit2.ok \ uninit3.awk \ @@ -1491,7 +1494,8 @@ GAWK_EXT_TESTS = \ splitarg4 strftime \ strtonum strtonum1 switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ symtab7 symtab8 symtab9 symtab10 \ - typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \ + typedregex1 typedregex2 typedregex3 \ + typeof1 typeof2 typeof3 typeof4 typeof5 \ timeout \ watchpoint1 @@ -4331,6 +4335,11 @@ typeof4: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +typeof5: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + timeout: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 30211d66..8ae71525 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1527,6 +1527,11 @@ typeof4: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +typeof5: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + timeout: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/typeof5.awk b/test/typeof5.awk new file mode 100644 index 00000000..30cd6aca --- /dev/null +++ b/test/typeof5.awk @@ -0,0 +1,10 @@ +BEGIN { + print typeof($0) + print typeof($1) +} + +{ + $3 = $1 + print typeof($2) + print typeof($3) +} diff --git a/test/typeof5.in b/test/typeof5.in new file mode 100644 index 00000000..9daeafb9 --- /dev/null +++ b/test/typeof5.in @@ -0,0 +1 @@ +test diff --git a/test/typeof5.ok b/test/typeof5.ok new file mode 100644 index 00000000..80f8cf51 --- /dev/null +++ b/test/typeof5.ok @@ -0,0 +1,4 @@ +unassigned +unassigned +unassigned +string |