diff options
| author | ruki <[email protected]> | 2026-02-02 23:51:44 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-02 23:51:44 +0800 |
| commit | 2ddc34d3ecfe4b3cdbf8370fdbcc4c46f61f54d0 (patch) | |
| tree | 32a35da5d47290b4211a519731d0d2bb7acd342d /tests/modules/stdin/test.lua | |
| parent | 1e9e8d25b8180d05ac8c99073f31cd6b085dc4a9 (diff) | |
Fix shell and command test cases for output consistency
Diffstat (limited to 'tests/modules/stdin/test.lua')
| -rw-r--r-- | tests/modules/stdin/test.lua | 6 |
1 files 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 |
