aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-12-19 22:08:43 +0200
committerArnold D. Robbins <arnold@skeeve.com>2020-12-19 22:08:43 +0200
commit3b50111ac31a64e01a2e64a06c7c276f6b9424cf (patch)
tree00f75b630efe8f70632fac5086038625d767e990 /test
parent8224cc546f7cfb0922fb69f3ad3f91313cf80e37 (diff)
downloadegawk-3b50111ac31a64e01a2e64a06c7c276f6b9424cf.tar.gz
egawk-3b50111ac31a64e01a2e64a06c7c276f6b9424cf.tar.bz2
egawk-3b50111ac31a64e01a2e64a06c7c276f6b9424cf.zip
First steps fixing +inform, +nancy.
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/inf-nan-torture.awk4
-rw-r--r--test/inf-nan-torture.in1
-rw-r--r--test/inf-nan-torture.ok16
7 files changed, 47 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 3817087e..48f28ed2 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2020-12-19 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRA_DIST): inf-nan-torture, new test.
+ * inf-nan-torture.awk, inf-nan-torture.in, inf-nan-torture.ok: New
+ files.
+
2020-10-29 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRA_DIST): functab5, new test.
diff --git a/test/Makefile.am b/test/Makefile.am
index aebdf83b..278a0eb1 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -563,6 +563,9 @@ EXTRA_DIST = \
indirectcall.awk \
indirectcall.in \
indirectcall.ok \
+ inf-nan-torture.awk \
+ inf-nan-torture.in \
+ inf-nan-torture.ok \
inftest.awk \
inftest.ok \
inplace1.1.ok \
@@ -1428,7 +1431,8 @@ GAWK_EXT_TESTS = \
genpot gensub gensub2 gensub3 getlndir gnuops2 gnuops3 gnureops gsubind \
icasefs icasers id igncdym igncfs ignrcas2 ignrcas4 ignrcase incdupe \
incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 include include2 \
- indirectbuiltin indirectcall indirectcall2 intarray iolint isarrayunset \
+ indirectbuiltin indirectcall indirectcall2 inf-nan-torture \
+ intarray iolint isarrayunset \
lint lintexp lintindex lintint lintlength lintplus lintold lintset lintwarn \
manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime muldimposix \
nastyparm negtime next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 \
diff --git a/test/Makefile.in b/test/Makefile.in
index bed55b9f..e0528b9d 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -826,6 +826,9 @@ EXTRA_DIST = \
indirectcall.awk \
indirectcall.in \
indirectcall.ok \
+ inf-nan-torture.awk \
+ inf-nan-torture.in \
+ inf-nan-torture.ok \
inftest.awk \
inftest.ok \
inplace1.1.ok \
@@ -1691,7 +1694,8 @@ GAWK_EXT_TESTS = \
genpot gensub gensub2 gensub3 getlndir gnuops2 gnuops3 gnureops gsubind \
icasefs icasers id igncdym igncfs ignrcas2 ignrcas4 ignrcase incdupe \
incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 include include2 \
- indirectbuiltin indirectcall indirectcall2 intarray iolint isarrayunset \
+ indirectbuiltin indirectcall indirectcall2 inf-nan-torture \
+ intarray iolint isarrayunset \
lint lintexp lintindex lintint lintlength lintplus lintold lintset lintwarn \
manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime muldimposix \
nastyparm negtime next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 \
@@ -4536,6 +4540,11 @@ indirectcall2:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+inf-nan-torture:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
intarray:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk --non-decimal-data >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 7fc7d87f..d849f54d 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1624,6 +1624,11 @@ indirectcall2:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+inf-nan-torture:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
intarray:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk --non-decimal-data >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/inf-nan-torture.awk b/test/inf-nan-torture.awk
new file mode 100644
index 00000000..8d145f2a
--- /dev/null
+++ b/test/inf-nan-torture.awk
@@ -0,0 +1,4 @@
+{
+ for (i = 1; i <= NF; i++)
+ print i, $i, $i + 0
+}
diff --git a/test/inf-nan-torture.in b/test/inf-nan-torture.in
new file mode 100644
index 00000000..45dfdc85
--- /dev/null
+++ b/test/inf-nan-torture.in
@@ -0,0 +1 @@
+-inf -inform inform -nan -nancy nancy -123 0 123 +123 nancy +nancy +nan inform +inform +inf
diff --git a/test/inf-nan-torture.ok b/test/inf-nan-torture.ok
new file mode 100644
index 00000000..40d31942
--- /dev/null
+++ b/test/inf-nan-torture.ok
@@ -0,0 +1,16 @@
+1 -inf -inf
+2 -inform 0
+3 inform 0
+4 -nan -nan
+5 -nancy 0
+6 nancy 0
+7 -123 -123
+8 0 0
+9 123 123
+10 +123 123
+11 nancy 0
+12 +nancy 0
+13 +nan +nan
+14 inform 0
+15 +inform 0
+16 +inf +inf