aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog2
-rw-r--r--test/Makefile.am4
-rw-r--r--test/sigpipe1.awk13
-rw-r--r--test/sigpipe1.ok3
4 files changed, 21 insertions, 1 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index e9ea5770..927d23f6 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -2,6 +2,8 @@
* Makefile.am (arrayind1): New test.
* arrayind1.awk, arrayind1.in, arrayind1.ok: New files.
+ * Makefile.am (sigpipe1): New test.
+ * sigpipe1.awk, sigpipe1.ok: New files.
2016-04-27 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 07637e12..1d5f8907 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -894,6 +894,8 @@ EXTRA_DIST = \
sclifin.ok \
shadow.awk \
shadow.ok \
+ sigpipe1.awk \
+ sigpipe1.ok \
sort1.awk \
sort1.ok \
sortempty.awk \
@@ -1076,7 +1078,7 @@ BASIC_TESTS = \
regexprange regrange reindops \
reparse resplit rri1 rs rscompat rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \
rstest3 rstest4 rstest5 rswhite \
- scalar sclforin sclifin sortempty sortglos splitargv splitarr splitdef \
+ scalar sclforin sclifin sigpipe1 sortempty sortglos splitargv splitarr splitdef \
splitvar splitwht strcat1 strnum1 strtod subamp subi18n \
subsepnm subslash substr swaplns synerr1 synerr2 tradanch tweakfld \
uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs \
diff --git a/test/sigpipe1.awk b/test/sigpipe1.awk
new file mode 100644
index 00000000..9b23f390
--- /dev/null
+++ b/test/sigpipe1.awk
@@ -0,0 +1,13 @@
+BEGIN {
+ print "system"
+ command = "yes | true"
+ system(command)
+
+ print "pipe to command"
+ print "hi" | command
+ close(command)
+
+ print "pipe from command"
+ command | getline x
+ close(command)
+}
diff --git a/test/sigpipe1.ok b/test/sigpipe1.ok
new file mode 100644
index 00000000..6596f076
--- /dev/null
+++ b/test/sigpipe1.ok
@@ -0,0 +1,3 @@
+system
+pipe to command
+pipe from command