summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-03-31 22:13:41 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-03-31 22:13:41 +0300
commit67d5cc4c4034f16a2390e30d8e988713e5aedb68 (patch)
tree33ef9bec17e5bfd44c0ef05d9848a5c5ccf8d219
parenta47af3141cf4a6b43e20db872e2b45ff9abb071f (diff)
downloadgawk-67d5cc4c4034f16a2390e30d8e988713e5aedb68.tar.gz
Add tests for indirect call of builtins.
-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/indirectbuiltin.awk (renamed from indirectbuitin.awk)0
-rw-r--r--test/indirectbuiltin.ok43
6 files changed, 64 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index ab7a2163..38ae4d3a 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-31 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (indirectbuiltin): New test.
+ * indirectbuiltin.awk, indirectbuiltin.ok: New files.
+
2015-03-24 Arnold D. Robbins <arnold@skeeve.com>
* id.ok: Update after fixes in code.
diff --git a/test/Makefile.am b/test/Makefile.am
index f1a0a275..ec15fcd9 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -429,6 +429,8 @@ EXTRA_DIST = \
include.awk \
include.ok \
include2.ok \
+ indirectbuiltin.awk \
+ indirectbuiltin.ok \
indirectcall.awk \
indirectcall.in \
indirectcall.ok \
@@ -1043,7 +1045,7 @@ GAWK_EXT_TESTS = \
genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops \
icasefs icasers id igncdym igncfs ignrcas2 ignrcase \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
- include include2 indirectcall indirectcall2 \
+ include include2 indirectbuiltin 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 b794e04e..e2656588 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -686,6 +686,8 @@ EXTRA_DIST = \
include.awk \
include.ok \
include2.ok \
+ indirectbuiltin.awk \
+ indirectbuiltin.ok \
indirectcall.awk \
indirectcall.in \
indirectcall.ok \
@@ -1299,7 +1301,7 @@ GAWK_EXT_TESTS = \
genpot gensub gensub2 getlndir gnuops2 gnuops3 gnureops \
icasefs icasers id igncdym igncfs ignrcas2 ignrcase \
incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
- include include2 indirectcall indirectcall2 \
+ include include2 indirectbuiltin indirectcall indirectcall2 \
lint lintold lintwarn \
manyfiles match1 match2 match3 mbstr1 \
nastyparm next nondec nondec2 \
@@ -3586,6 +3588,11 @@ include:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+indirectbuiltin:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
indirectcall:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 8c270869..f36e495e 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1107,6 +1107,11 @@ include:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+indirectbuiltin:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
indirectcall:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/indirectbuitin.awk b/test/indirectbuiltin.awk
index 4d5291d2..4d5291d2 100644
--- a/indirectbuitin.awk
+++ b/test/indirectbuiltin.awk
diff --git a/test/indirectbuiltin.ok b/test/indirectbuiltin.ok
new file mode 100644
index 00000000..312bbd76
--- /dev/null
+++ b/test/indirectbuiltin.ok
@@ -0,0 +1,43 @@
+math: and: pass
+math: atan2: pass
+math: compl: pass
+math: cos: pass
+math: exp: pass
+math: int: pass
+math: log: pass
+math: lshift: pass
+math: or: pass
+math: rand: pass
+math: rshift: pass
+math: sin: pass
+math: sqrt: pass
+math: srand: pass
+math: xor: pass
+string: gensub: pass
+string: gsub: pass
+string: index: pass
+string: dcgettext: pass
+string: dcngettext: pass
+string: length: pass
+string: sprintf: pass
+string: strtonum: pass
+string: sub: pass
+string: substr: pass
+string: tolower: pass
+string: toupper: pass
+time: mktime: pass
+time: strftime: pass
+time: systime: pass
+regexp: match: pass
+regexp: patsplit: pass
+regexp: patsplit: pass
+regexp: patsplit: pass
+regexp: split: pass
+regexp: split: pass
+regexp: split: pass
+array: asort: pass
+array: asorti: pass
+array: isarray: pass
+i/o: fflush: pass
+i/o: close: pass
+i/o: system: pass