aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-07-23 22:11:52 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-07-23 22:11:52 +0300
commitadb5491f2c9f49bf3d0e57f52c55bcaa4221e36e (patch)
tree4e76b81c1ec485cc10f52d47b699a894cf65a247 /test
parentb7a631b6fa5ed5577520eccb1608956bd40a74e0 (diff)
parentde23ab7bfbea6ee03ef7386c6c203a4b2b7b7116 (diff)
downloadegawk-adb5491f2c9f49bf3d0e57f52c55bcaa4221e36e.tar.gz
egawk-adb5491f2c9f49bf3d0e57f52c55bcaa4221e36e.tar.bz2
egawk-adb5491f2c9f49bf3d0e57f52c55bcaa4221e36e.zip
Merge branch 'master' into feature/nocopy
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 35b60f65..f18b562b 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 f884ba34..0c4e0113 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -728,6 +728,8 @@ EXTRA_DIST = \
ofmts.awk \
ofmts.in \
ofmts.ok \
+ ofmtstrnum.awk \
+ ofmtstrnum.ok \
ofs1.awk \
ofs1.in \
ofs1.ok \
@@ -1003,6 +1005,8 @@ EXTRA_DIST = \
sprintfc.awk \
sprintfc.in \
sprintfc.ok \
+ status-close.awk \
+ status-close.ok \
strcat1.awk \
strcat1.ok \
strftime.awk \
@@ -1167,7 +1171,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 \
@@ -1178,7 +1183,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 45593f15..8c7ce31f 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -985,6 +985,8 @@ EXTRA_DIST = \
ofmts.awk \
ofmts.in \
ofmts.ok \
+ ofmtstrnum.awk \
+ ofmtstrnum.ok \
ofs1.awk \
ofs1.in \
ofs1.ok \
@@ -1260,6 +1262,8 @@ EXTRA_DIST = \
sprintfc.awk \
sprintfc.in \
sprintfc.ok \
+ status-close.awk \
+ status-close.ok \
strcat1.awk \
strcat1.ok \
strftime.awk \
@@ -1423,7 +1427,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 \
@@ -1434,7 +1439,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 \
@@ -3398,6 +3403,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: $$? >>_$@
@@ -3665,6 +3675,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 4c85c44a..bfcb87cb 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -635,6 +635,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: $$? >>_$@
@@ -902,6 +907,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