diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/asset/shell/pipe.et | 5 | ||||
| -rw-r--r-- | test/script/shell.et | 20 | 
2 files changed, 25 insertions, 0 deletions
| diff --git a/test/asset/shell/pipe.et b/test/asset/shell/pipe.et new file mode 100644 index 0000000..64dcb07 --- /dev/null +++ b/test/asset/shell/pipe.et @@ -0,0 +1,5 @@ +test Pipe: +    node n +    shell on n as sh: +        echo abcd | grep -o '[bc]*' +        echo abcd | grep -o '[bcd]*' | grep -o '[ab]*' diff --git a/test/script/shell.et b/test/script/shell.et index 7db19c8..2fe4ec3 100644 --- a/test/script/shell.et +++ b/test/script/shell.et @@ -58,3 +58,23 @@ test ShellEcho:      with p:          expect /run-test-result Echo done/          expect /run-all-done/ + + +test ShellPipe: +    spawn as p +    with p: +        send "load ${scripts.path}/pipe.et" +        local: +            expect /(load-.*)/ capture done +            guard (done == "load-done") +        flush + +        send "run-all" + +    expect_next_stdout from p: +        "bc" +        "b" + +    with p: +        expect /run-test-result Pipe done/ +        expect /run-all-done/ |