aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog10
-rw-r--r--test/Makefile.am9
-rw-r--r--test/Makefile.in19
-rw-r--r--test/Maketests10
-rw-r--r--test/ofmtstrnum.awk7
-rw-r--r--test/ofmtstrnum.ok2
-rw-r--r--test/status-close.awk14
-rw-r--r--test/status-close.ok6
8 files changed, 73 insertions, 4 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 7d800fb0..f159be72 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,13 @@
+2016-07-23 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (status-close): New test.
+ * status-close.awk, status-close.ok: New files.
+
+2015-06-17 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (ofmtstrnum): New test.
+ * ofmtstrnu.awk, ofmtstrnum.ok: New files.
+
2016-07-20 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRA_DIST): Remove clos1way6.ok2.
diff --git a/test/Makefile.am b/test/Makefile.am
index 3a51b3ff..40636acd 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -720,6 +720,8 @@ EXTRA_DIST = \
ofmts.awk \
ofmts.in \
ofmts.ok \
+ ofmtstrnum.awk \
+ ofmtstrnum.ok \
ofs1.awk \
ofs1.in \
ofs1.ok \
@@ -995,6 +997,8 @@ EXTRA_DIST = \
sprintfc.awk \
sprintfc.in \
sprintfc.ok \
+ status-close.awk \
+ status-close.ok \
strcat1.awk \
strcat1.ok \
strftime.awk \
@@ -1159,7 +1163,8 @@ BASIC_TESTS = \
nasty nasty2 negexp negrange nested nfldstr nfloop nfneg nfset nlfldsep \
nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \
noparms nors nulinsrc nulrsend numindex numsubstr \
- octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofs1 onlynl opasnidx opasnslf \
+ octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofmtstrnum ofs1 onlynl \
+ opasnidx opasnslf \
paramasfunc1 paramasfunc2 \
paramdup paramres paramtyp paramuninitglobal parse1 parsefld parseme \
pcntplus posix2008sub prdupval prec printf0 printf1 printfchar prmarscl prmreuse \
@@ -1170,7 +1175,7 @@ BASIC_TESTS = \
reparse resplit rri1 rs rscompat rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \
rstest3 rstest4 rstest5 rswhite \
scalar sclforin sclifin sigpipe1 sortempty sortglos splitargv splitarr splitdef \
- splitvar splitwht strcat1 strnum1 strnum2 strtod subamp subback subi18n \
+ splitvar splitwht status-close strcat1 strnum1 strnum2 strtod subamp subback subi18n \
subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \
uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \
wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \
diff --git a/test/Makefile.in b/test/Makefile.in
index 29064326..beb2af2d 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -977,6 +977,8 @@ EXTRA_DIST = \
ofmts.awk \
ofmts.in \
ofmts.ok \
+ ofmtstrnum.awk \
+ ofmtstrnum.ok \
ofs1.awk \
ofs1.in \
ofs1.ok \
@@ -1252,6 +1254,8 @@ EXTRA_DIST = \
sprintfc.awk \
sprintfc.in \
sprintfc.ok \
+ status-close.awk \
+ status-close.ok \
strcat1.awk \
strcat1.ok \
strftime.awk \
@@ -1415,7 +1419,8 @@ BASIC_TESTS = \
nasty nasty2 negexp negrange nested nfldstr nfloop nfneg nfset nlfldsep \
nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \
noparms nors nulinsrc nulrsend numindex numsubstr \
- octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofs1 onlynl opasnidx opasnslf \
+ octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofmtstrnum ofs1 onlynl \
+ opasnidx opasnslf \
paramasfunc1 paramasfunc2 \
paramdup paramres paramtyp paramuninitglobal parse1 parsefld parseme \
pcntplus posix2008sub prdupval prec printf0 printf1 printfchar prmarscl prmreuse \
@@ -1426,7 +1431,7 @@ BASIC_TESTS = \
reparse resplit rri1 rs rscompat rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \
rstest3 rstest4 rstest5 rswhite \
scalar sclforin sclifin sigpipe1 sortempty sortglos splitargv splitarr splitdef \
- splitvar splitwht strcat1 strnum1 strnum2 strtod subamp subback subi18n \
+ splitvar splitwht status-close strcat1 strnum1 strnum2 strtod subamp subback subi18n \
subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \
uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \
wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \
@@ -3380,6 +3385,11 @@ ofmts:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+ofmtstrnum:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
ofs1:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -3647,6 +3657,11 @@ splitwht:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+status-close:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
strcat1:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 525a44d1..d9b4fe09 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -625,6 +625,11 @@ ofmts:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+ofmtstrnum:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
ofs1:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -892,6 +897,11 @@ splitwht:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+status-close:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
strcat1:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/ofmtstrnum.awk b/test/ofmtstrnum.awk
new file mode 100644
index 00000000..805dad73
--- /dev/null
+++ b/test/ofmtstrnum.awk
@@ -0,0 +1,7 @@
+BEGIN {
+ split(" 1", f, "|")
+ OFMT = "%.1f"
+ print f[1]
+ x = f[1] + 0
+ print f[1]
+}
diff --git a/test/ofmtstrnum.ok b/test/ofmtstrnum.ok
new file mode 100644
index 00000000..ae955868
--- /dev/null
+++ b/test/ofmtstrnum.ok
@@ -0,0 +1,2 @@
+ 1
+ 1
diff --git a/test/status-close.awk b/test/status-close.awk
new file mode 100644
index 00000000..345bea49
--- /dev/null
+++ b/test/status-close.awk
@@ -0,0 +1,14 @@
+BEGIN {
+ cat = "cat ; exit 3"
+ print system("echo xxx | (cat ; exit 4)")
+
+ print "YYY" | cat
+
+ print close(cat)
+
+ echo = "echo boo ; exit 5"
+ echo | getline boo
+ print "got", boo
+
+ print close(echo)
+}
diff --git a/test/status-close.ok b/test/status-close.ok
new file mode 100644
index 00000000..ad3c0ce1
--- /dev/null
+++ b/test/status-close.ok
@@ -0,0 +1,6 @@
+xxx
+4
+YYY
+3
+got boo
+5