diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-08-30 22:09:14 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-09-01 20:44:22 +0200 |
commit | 27bf4a78b7203ed77790c92134213c3398214daa (patch) | |
tree | 5e17a92e4d4704ede7823595f42fb45ef686afbf /test | |
parent | fc40dfc41e8b3fbbe830846499ccce122930b235 (diff) |
Changelog: Added `ignore` builtin command
Diffstat (limited to 'test')
-rw-r--r-- | test/asset/run-success/command-ignore.et | 39 | ||||
-rw-r--r-- | test/script/run.et | 2 |
2 files changed, 40 insertions, 1 deletions
diff --git a/test/asset/run-success/command-ignore.et b/test/asset/run-success/command-ignore.et new file mode 100644 index 0000000..dc950d1 --- /dev/null +++ b/test/asset/run-success/command-ignore.et @@ -0,0 +1,39 @@ +def expect_next from p (str): + expect /(.*)/ from p capture line + guard (line == str) + +test Test: + node n + shell on n as p: + cat + + send "a" to p + send "b" to p + send "x" to p + expect /x/ from p + + ignore from p matching /a/ + send "a" to p + send "c" to p + + expect_next "b" from p + expect_next "c" from p + + send "a" to p + send "b" to p + with p: + send "c" + ignore matching /[bcd]/ + send "d" + send "e" + expect_next "e" from p + + send "a" to p + send "b" to p + local: + send "c" to p + send "d" to p + + expect_next "b" from p + expect_next "c" from p + expect_next "d" from p diff --git a/test/script/run.et b/test/script/run.et index 7cc1670..c3c698e 100644 --- a/test/script/run.et +++ b/test/script/run.et @@ -29,7 +29,7 @@ test TrivialRun: test SimpleRun: - let should_succeed = [ "bool" ] + let should_succeed = [ "bool", "command-ignore" ] let should_fail = [ "bool" ] spawn as p |