[RFA 3/4] Test the | (pipe) command.

Philippe Waroquiers philippe.waroquiers@skynet.be
Sat Apr 20 21:22:00 GMT 2019


gdb/testsuite/ChangeLog
2019-04-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	* gdb.base/shell.exp: Test pipe command.
---
 gdb/testsuite/gdb.base/shell.exp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gdb/testsuite/gdb.base/shell.exp b/gdb/testsuite/gdb.base/shell.exp
index 60d6e31e4f..1840eab322 100644
--- a/gdb/testsuite/gdb.base/shell.exp
+++ b/gdb/testsuite/gdb.base/shell.exp
@@ -22,3 +22,12 @@ gdb_test "shell echo foo" "foo"
 
 gdb_test "! echo foo" "foo"
 gdb_test "!echo foo" "foo"
+
+gdb_test "pipe help pipe | wc -l" "6" "check simple pipe"
+gdb_test "pipe help pipe | grep Usage: | wc -l" "2" "check double pipe"
+
+gdb_test "| help pipe | grep Usage: | wc -l" "2" "check double pipe, pipe char"
+gdb_test "|help pipe|grep Usage:|wc -l" "2" "no space around pipe char"
+
+gdb_test "echo coucou\\n" "coucou" "echo coucou"
+gdb_test "||wc -l" "1" "Check repeat previous command"
-- 
2.20.1



More information about the Gdb-patches mailing list