aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog6
-rw-r--r--test/Makefile.am6
-rw-r--r--test/Makefile.in11
-rw-r--r--test/Maketests5
-rw-r--r--test/typeof5.awk10
-rw-r--r--test/typeof5.in1
-rw-r--r--test/typeof5.ok4
7 files changed, 41 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 4aa98610..918c16c5 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 dfedcd64..00d50a0a 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1113,6 +1113,9 @@ EXTRA_DIST = \
typeof3.ok \
typeof4.awk \
typeof4.ok \
+ typeof5.awk \
+ typeof5.in \
+ typeof5.ok \
uninit2.awk \
uninit2.ok \
uninit3.awk \
@@ -1237,7 +1240,8 @@ GAWK_EXT_TESTS = \
splitarg4 strftime strftfld \
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 af75a6a9..727fdb4b 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1371,6 +1371,9 @@ EXTRA_DIST = \
typeof3.ok \
typeof4.awk \
typeof4.ok \
+ typeof5.awk \
+ typeof5.in \
+ typeof5.ok \
uninit2.awk \
uninit2.ok \
uninit3.awk \
@@ -1494,7 +1497,8 @@ GAWK_EXT_TESTS = \
splitarg4 strftime strftfld \
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
@@ -4339,6 +4343,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 9036ff99..ac3cedca 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1532,6 +1532,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