From 2ddc34d3ecfe4b3cdbf8370fdbcc4c46f61f54d0 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 2 Feb 2026 23:51:44 +0800 Subject: Fix shell and command test cases for output consistency --- tests/modules/stdin/test.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/modules/stdin/test.lua b/tests/modules/stdin/test.lua index 351955f71..d739e9bab 100644 --- a/tests/modules/stdin/test.lua +++ b/tests/modules/stdin/test.lua @@ -32,14 +32,14 @@ end function test_sh(t) _run_sh(t, "sh_single", "echo \"print('hello_sh')\"", "hello_sh") - _run_sh(t, "sh_calc", 'echo "local f = 1+1; print(f)"', "2") + _run_sh(t, "sh_calc", "echo \"local f = 1+1; print(f)\"", "2") _run_sh(t, "sh_main", "echo \"function main() print('in_sh_main') end\"", "in_sh_main") _run_sh(t, "sh_multi", "printf \"print('shell_line1')\\nprint('shell_line2')\"", "shell_line1\nshell_line2") end function test_cmd(t) _run_cmd(t, "cmd_single", "echo print 'hello_cmd'", "hello_cmd") - _run_cmd(t, "cmd_calc", "echo local f = 1+1; print^(f^)", "2") + _run_cmd(t, "cmd_calc", "echo local f = 1+1; print(f)", "2") _run_cmd(t, "cmd_multi_lines", "(echo print 'line1'&& echo print 'line2')", "line1\r\nline2") _run_cmd(t, "cmd_multi_semicolon", "echo \"print('semi1'); print('semi2')\"", "semi1\r\nsemi2") end @@ -48,5 +48,5 @@ function test_pwsh(t) _run_pwsh(t, "pwsh_single", "echo \"print('hello_pwsh')\"", "hello_pwsh") _run_pwsh(t, "pwsh_calc", "echo \"local f = 1+1; print(f)\"", "2") _run_pwsh(t, "pwsh_main", "echo \"function main() print('in_pwsh_main') end\"", "in_pwsh_main") - _run_pwsh(t, "pwsh_multi", "echo \"print('pline1')`nprint('pline2')\"", "pline1\r\npline2") + _run_pwsh(t, "pwsh_multi", "echo \"print('pline1')\"; echo \"print('pline2')\"", "pline1\r\npline2") end -- cgit v1.3.1