diff options
| author | Saikari <[email protected]> | 2026-02-02 13:28:27 +0300 |
|---|---|---|
| committer | Saikari <[email protected]> | 2026-02-02 13:28:27 +0300 |
| commit | 71b0520a355f1a5e4ba0be5f2ef042118aed8432 (patch) | |
| tree | 597b162182f6fb2b18a6cf1025c1de26939c08ee /tests/modules/stdin/test.lua | |
| parent | 30cfb753c860681adf34ddf3507119ff63f9f8be (diff) | |
refactor: enhance stdin command tests by adding multi-line and semicolon command handling
Diffstat (limited to 'tests/modules/stdin/test.lua')
| -rw-r--r-- | tests/modules/stdin/test.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/modules/stdin/test.lua b/tests/modules/stdin/test.lua index 1780c622c..f1aee7f27 100644 --- a/tests/modules/stdin/test.lua +++ b/tests/modules/stdin/test.lua @@ -92,10 +92,15 @@ function main(t) test_shell("cmd_single", string.format("cmd /c echo \"print('hello_cmd')\" | %s l --stdin", xmake), "hello_cmd") test_shell("cmd_calc", string.format('cmd /c echo "local f = 1+1; print(f)" | %s l --stdin', xmake), "2") test_shell( - "cmd_multi", + "cmd_multi_lines", string.format("cmd /c \"(echo print 'line1'& echo print 'line2')\" | %s l --stdin", xmake), "line1[\r\n]+line2" ) + test_shell( + "cmd_multi_semicolon", + string.format("cmd /c echo \"print('semi1'); print('semi2')\" | %s l --stdin", xmake), + "semi1[\r\n]+semi2" + ) -- Test powershell (if available) local pwsh = "powershell" try({ |
