aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
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/numstr1.awk7
-rw-r--r--test/numstr1.ok2
6 files changed, 30 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 5799b03d..7ad48010 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -12,6 +12,11 @@
* Makefile.am (mpfrrndeval): New test.
* mpfrrndeval.awk, mpfrrndeval.ok: New files.
+2017-12-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRA_DIST): Add numstr1 files.
+ * numstr1.awk, numstr1.ok: New files.
+
2017-11-14 Andrew J. Schorr <aschorr@telemetry-investments.com>
* Makefile.am (EXTRA_DIST): Add new tests setrec0 and setrec1.
diff --git a/test/Makefile.am b/test/Makefile.am
index 3c9f2b0c..f49cbdc9 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -749,6 +749,8 @@ EXTRA_DIST = \
numindex.awk \
numindex.in \
numindex.ok \
+ numstr1.awk \
+ numstr1.ok \
numsubstr.awk \
numsubstr.in \
numsubstr.ok \
@@ -1228,7 +1230,7 @@ BASIC_TESTS = \
manglprm math membug1 memleak messages minusstr mmap8k mtchi18n \
nasty nasty2 negexp negrange nested nfldstr nfloop nfneg nfset nlfldsep \
nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl noparms \
- nors nulinsrc nulrsend numindex numsubstr \
+ nors nulinsrc nulrsend numindex numstr1 numsubstr \
octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofmtstrnum ofs1 onlynl \
opasnidx opasnslf \
paramasfunc1 paramasfunc2 paramdup paramres paramtyp paramuninitglobal \
diff --git a/test/Makefile.in b/test/Makefile.in
index 482040a7..47ca0371 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1007,6 +1007,8 @@ EXTRA_DIST = \
numindex.awk \
numindex.in \
numindex.ok \
+ numstr1.awk \
+ numstr1.ok \
numsubstr.awk \
numsubstr.in \
numsubstr.ok \
@@ -1485,7 +1487,7 @@ BASIC_TESTS = \
manglprm math membug1 memleak messages minusstr mmap8k mtchi18n \
nasty nasty2 negexp negrange nested nfldstr nfloop nfneg nfset nlfldsep \
nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl noparms \
- nors nulinsrc nulrsend numindex numsubstr \
+ nors nulinsrc nulrsend numindex numstr1 numsubstr \
octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofmtstrnum ofs1 onlynl \
opasnidx opasnslf \
paramasfunc1 paramasfunc2 paramdup paramres paramtyp paramuninitglobal \
@@ -3511,6 +3513,11 @@ numindex:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+numstr1:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
numsubstr:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index f64b8640..6a685101 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -620,6 +620,11 @@ numindex:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+numstr1:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
numsubstr:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/numstr1.awk b/test/numstr1.awk
new file mode 100644
index 00000000..e58404fc
--- /dev/null
+++ b/test/numstr1.awk
@@ -0,0 +1,7 @@
+BEGIN {
+ split("1.234", f)
+ OFMT = "%.1f"
+ print f[1]
+ x = f[1]+0
+ print f[1]
+}
diff --git a/test/numstr1.ok b/test/numstr1.ok
new file mode 100644
index 00000000..434a231c
--- /dev/null
+++ b/test/numstr1.ok
@@ -0,0 +1,2 @@
+1.234
+1.234