aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2022-03-27 08:07:51 +0300
committerArnold D. Robbins <arnold@skeeve.com>2022-03-27 08:07:51 +0300
commitc2f6af30f602aa1a28e59491cbbfcf9145350f78 (patch)
tree0ce9863bebfb4e8b925f16b741a6d793dee1395f /test
parent0cdb4a0e28663cde0937601d26789ba5a6697848 (diff)
parent656b5bbec59a3094ae13f3bdac7ae2ef1e2fb5e9 (diff)
downloadegawk-c2f6af30f602aa1a28e59491cbbfcf9145350f78.tar.gz
egawk-c2f6af30f602aa1a28e59491cbbfcf9145350f78.tar.bz2
egawk-c2f6af30f602aa1a28e59491cbbfcf9145350f78.zip
Merge branch 'gawk-5.1-stable'
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/Makefile.am4
-rw-r--r--test/Makefile.in9
-rw-r--r--test/Maketests5
-rw-r--r--test/indirectcall3.awk16
-rw-r--r--test/indirectcall3.ok0
6 files changed, 37 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 44a0e951..51aad696 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2022-03-27 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRA_DIST): indirectcall3, new test.
+ * indirectcall3.awk, indirectcall3.ok: New files.
+
2022-02-27 Arnold D. Robbins <arnold@skeeve.com>
* badargs.ok: Updated after code change.
diff --git a/test/Makefile.am b/test/Makefile.am
index ddca3f59..e6652965 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -575,6 +575,8 @@ EXTRA_DIST = \
indirectbuiltin2.ok \
indirectcall2.awk \
indirectcall2.ok \
+ indirectcall3.awk \
+ indirectcall3.ok \
indirectcall.awk \
indirectcall.in \
indirectcall.ok \
@@ -1460,7 +1462,7 @@ GAWK_EXT_TESTS = \
icasefs icasers id igncdym igncfs ignrcas2 ignrcas4 ignrcase \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
include include2 indirectbuiltin indirectcall indirectcall2 \
- indirectbuiltin2 \
+ indirectcall3 indirectbuiltin2 \
inf-nan-torture intarray iolint isarrayunset lint lintexp \
lintindex lintint lintlength lintold lintplus lintset lintwarn \
manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \
diff --git a/test/Makefile.in b/test/Makefile.in
index d974a98c..ed60771d 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -841,6 +841,8 @@ EXTRA_DIST = \
indirectbuiltin2.ok \
indirectcall2.awk \
indirectcall2.ok \
+ indirectcall3.awk \
+ indirectcall3.ok \
indirectcall.awk \
indirectcall.in \
indirectcall.ok \
@@ -1726,7 +1728,7 @@ GAWK_EXT_TESTS = \
icasefs icasers id igncdym igncfs ignrcas2 ignrcas4 ignrcase \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
include include2 indirectbuiltin indirectcall indirectcall2 \
- indirectbuiltin2 \
+ indirectcall3 indirectbuiltin2 \
inf-nan-torture intarray iolint isarrayunset lint lintexp \
lintindex lintint lintlength lintold lintplus lintset lintwarn \
manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \
@@ -4620,6 +4622,11 @@ indirectcall2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+indirectcall3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
inf-nan-torture:
@echo $@ $(ZOS_FAIL)
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 10ef252f..d21d4c6c 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1653,6 +1653,11 @@ indirectcall2:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+indirectcall3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
inf-nan-torture:
@echo $@ $(ZOS_FAIL)
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/indirectcall3.awk b/test/indirectcall3.awk
new file mode 100644
index 00000000..67181112
--- /dev/null
+++ b/test/indirectcall3.awk
@@ -0,0 +1,16 @@
+function okay(f1, f2, arg)
+{
+ return @f1(arg)
+}
+
+function not_so_hot(f1, f2, arg)
+{
+ return @f1(arg, @f2(arg)) # line 8: error here
+}
+
+function workaround(f1, f2, arg,
+ tmp)
+{
+ tmp = @f2(arg)
+ return @f1(arg, tmp)
+}
diff --git a/test/indirectcall3.ok b/test/indirectcall3.ok
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/indirectcall3.ok