[RFA,3/4] Test the | (pipe) command.
Commit Message
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(+)
Comments
>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
Philippe> gdb/testsuite/ChangeLog
Philippe> 2019-04-20 Philippe Waroquiers <philippe.waroquiers@skynet.be>
Philippe> * gdb.base/shell.exp: Test pipe command.
This seems fine though I wonder whether there are test environments
without the necessary commands.
Tom
@@ -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"