diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 6 | ||||
-rw-r--r-- | test/Makefile.in | 11 | ||||
-rw-r--r-- | test/Maketests | 5 | ||||
-rw-r--r-- | test/pipeio3.awk | 15 | ||||
-rw-r--r-- | test/pipeio3.ok | 6 |
5 files changed, 39 insertions, 4 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 7034b1f3..e574a22e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -653,6 +653,8 @@ EXTRA_DIST = \ pipeio2.awk \ pipeio2.in \ pipeio2.ok \ + pipeio3.awk \ + pipeio3.ok \ posix.awk \ posix.in \ posix.ok \ @@ -974,8 +976,8 @@ BASIC_TESTS = \ zero2 zeroe0 zeroflag UNIX_TESTS = \ - fflush getlnhd localenl pid pipeio1 pipeio2 poundbang rtlen rtlen01 \ - space strftlng + fflush getlnhd localenl pid pipeio1 pipeio2 pipeio3 poundbang \ + rtlen rtlen01 space strftlng GAWK_EXT_TESTS = \ aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ diff --git a/test/Makefile.in b/test/Makefile.in index 061136d6..31e59c13 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -871,6 +871,8 @@ EXTRA_DIST = \ pipeio2.awk \ pipeio2.in \ pipeio2.ok \ + pipeio3.awk \ + pipeio3.ok \ posix.awk \ posix.in \ posix.ok \ @@ -1191,8 +1193,8 @@ BASIC_TESTS = \ zero2 zeroe0 zeroflag UNIX_TESTS = \ - fflush getlnhd localenl pid pipeio1 pipeio2 poundbang rtlen rtlen01 \ - space strftlng + fflush getlnhd localenl pid pipeio1 pipeio2 pipeio3 poundbang \ + rtlen rtlen01 space strftlng GAWK_EXT_TESTS = \ aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ @@ -3189,6 +3191,11 @@ getlnhd: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +pipeio3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + aadelete1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index df272ce8..29f9a17c 100644 --- a/test/Maketests +++ b/test/Maketests @@ -907,6 +907,11 @@ getlnhd: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +pipeio3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + aadelete1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/pipeio3.awk b/test/pipeio3.awk new file mode 100644 index 00000000..a1cd3743 --- /dev/null +++ b/test/pipeio3.awk @@ -0,0 +1,15 @@ +BEGIN { + outputCommand = "cart" + inputCommand = "ls" + + print "doing first print" > "/dev/stderr" + print "hello" | outputCommand + + print "doing first getline" > "/dev/stderr" + inputCommand | getline + + print "doing second print" > "/dev/stderr" + print "hello" | outputCommand + + print "made it here" > "/dev/stderr" +} diff --git a/test/pipeio3.ok b/test/pipeio3.ok new file mode 100644 index 00000000..17a08e9c --- /dev/null +++ b/test/pipeio3.ok @@ -0,0 +1,6 @@ +doing first print +doing first getline +sh: 1: cart: not found +doing second print +gawk: pipeio3.awk:12: fatal: print to "cart" failed (Broken pipe) +EXIT CODE: 2 |