diff options
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/indirectcall3.awk | 16 | ||||
-rw-r--r-- | test/indirectcall3.ok | 0 |
6 files changed, 37 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index ddae26ea..27745de9 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-10 Andrew J. Schorr <aschorr@telemetry-investments.com> * Makefile.am (EXTRA_DIST): close_status, new test. diff --git a/test/Makefile.am b/test/Makefile.am index 96dd3027..0f79b8ca 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -573,6 +573,8 @@ EXTRA_DIST = \ indirectbuiltin2.ok \ indirectcall2.awk \ indirectcall2.ok \ + indirectcall3.awk \ + indirectcall3.ok \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ @@ -1455,7 +1457,7 @@ GAWK_EXT_TESTS = \ ignrcas2 ignrcas4 ignrcase incdupe incdupe2 incdupe3 incdupe4 \ incdupe5 incdupe6 incdupe7 include include2 indirectbuiltin \ indirectbuiltin2 \ - indirectcall indirectcall2 inf-nan-torture intarray iolint \ + indirectcall indirectcall2 indirectcall3 inf-nan-torture intarray iolint \ isarrayunset lint lintexp lintindex lintint lintlength lintplus \ lintold lintset lintwarn manyfiles match1 match2 match3 mbstr1 \ mbstr2 mixed1 mktime modifiers muldimposix nastyparm negtime \ diff --git a/test/Makefile.in b/test/Makefile.in index 94699c32..174d329d 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -839,6 +839,8 @@ EXTRA_DIST = \ indirectbuiltin2.ok \ indirectcall2.awk \ indirectcall2.ok \ + indirectcall3.awk \ + indirectcall3.ok \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ @@ -1721,7 +1723,7 @@ GAWK_EXT_TESTS = \ ignrcas2 ignrcas4 ignrcase incdupe incdupe2 incdupe3 incdupe4 \ incdupe5 incdupe6 incdupe7 include include2 indirectbuiltin \ indirectbuiltin2 \ - indirectcall indirectcall2 inf-nan-torture intarray iolint \ + indirectcall indirectcall2 indirectcall3 inf-nan-torture intarray iolint \ isarrayunset lint lintexp lintindex lintint lintlength lintplus \ lintold lintset lintwarn manyfiles match1 match2 match3 mbstr1 \ mbstr2 mixed1 mktime modifiers muldimposix nastyparm negtime \ @@ -4600,6 +4602,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 26831128..d206f2e4 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1648,6 +1648,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 |