From 71b0520a355f1a5e4ba0be5f2ef042118aed8432 Mon Sep 17 00:00:00 2001 From: Saikari Date: Mon, 2 Feb 2026 13:28:27 +0300 Subject: refactor: enhance stdin command tests by adding multi-line and semicolon command handling --- tests/modules/stdin/test.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/modules/stdin/test.lua') 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({ -- cgit v1.3.1