Message ID | 20190420212153.30934-4-philippe.waroquiers@skynet.be |
---|---|
State | New |
Headers | show |
>>>>> "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
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"