diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-05 08:35:18 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-09-05 08:35:18 +0300 |
commit | c30a04c8d3a2eef06338934f577fe3416f40d529 (patch) | |
tree | 8504c142721eb8d38cc8e3b4bc6c99481577afd4 | |
parent | 16a26e063e9c62bff0478fa210d875c4eed2b7c0 (diff) | |
download | egawk-c30a04c8d3a2eef06338934f577fe3416f40d529.tar.gz egawk-c30a04c8d3a2eef06338934f577fe3416f40d529.tar.bz2 egawk-c30a04c8d3a2eef06338934f577fe3416f40d529.zip |
New test, indirect call of builtin functions.
-rw-r--r-- | test/ChangeLog | 4 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/Makefile.in | 9 | ||||
-rw-r--r-- | test/Maketests | 5 | ||||
-rw-r--r-- | test/indirectcall2.awk | 11 | ||||
-rw-r--r-- | test/indirectcall2.ok | 4 |
6 files changed, 35 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 02580b43..ae1232c6 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -4,6 +4,10 @@ /tmp isn't /tmp on all systems (e.g. Mac OS X). Thanks to Hermann Peifer for the report. + Sort of related: + + * indirectcall2.awk, indirectcall2.ok: New files. + 2014-09-04 Arnold D. Robbins <arnold@skeeve.com> * profile2.ok: Update after code improvement in profiler. diff --git a/test/Makefile.am b/test/Makefile.am index ede44523..a4ebe2d5 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -421,6 +421,8 @@ EXTRA_DIST = \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ + indirectcall2.awk \ + indirectcall2.ok \ inftest.awk \ inftest.ok \ inplace.in \ @@ -1008,7 +1010,7 @@ GAWK_EXT_TESTS = \ gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ icasefs icasers id igncdym igncfs ignrcas2 ignrcase \ incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \ - include include2 indirectcall \ + include include2 indirectcall indirectcall2 \ lint lintold lintwarn \ manyfiles match1 match2 match3 mbstr1 \ nastyparm next nondec nondec2 \ diff --git a/test/Makefile.in b/test/Makefile.in index 196e125c..02249f2f 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -667,6 +667,8 @@ EXTRA_DIST = \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ + indirectcall2.awk \ + indirectcall2.ok \ inftest.awk \ inftest.ok \ inplace.in \ @@ -1253,7 +1255,7 @@ GAWK_EXT_TESTS = \ gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ icasefs icasers id igncdym igncfs ignrcas2 ignrcase \ incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \ - include include2 indirectcall \ + include include2 indirectcall indirectcall2 \ lint lintold lintwarn \ manyfiles match1 match2 match3 mbstr1 \ nastyparm next nondec nondec2 \ @@ -3468,6 +3470,11 @@ indirectcall: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +indirectcall2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + lint: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 0841ae77..5c34af9e 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1082,6 +1082,11 @@ indirectcall: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +indirectcall2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + lint: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/indirectcall2.awk b/test/indirectcall2.awk new file mode 100644 index 00000000..8f3c9483 --- /dev/null +++ b/test/indirectcall2.awk @@ -0,0 +1,11 @@ +BEGIN { + Quarter_pi = 3.1415927 / 4 + print sin(Quarter_pi) + + f = "sin" + print @f(Quarter_pi) + + print substr("abcdefgh", 2, 3) + f = "substr" + print @f("abcdefgh", 2, 3) +} diff --git a/test/indirectcall2.ok b/test/indirectcall2.ok new file mode 100644 index 00000000..05bee4b1 --- /dev/null +++ b/test/indirectcall2.ok @@ -0,0 +1,4 @@ +0.707107 +0.707107 +bcd +bcd |