From fc40dfc41e8b3fbbe830846499ccce122930b235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 7 Aug 2025 21:45:20 +0200 Subject: Shell pipes Changelog: Implemented pipes in shell scripts --- test/asset/shell/pipe.et | 5 +++++ test/script/shell.et | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/asset/shell/pipe.et (limited to 'test') 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/ -- cgit v1.2.3