From e2b38bd5e164e6584aceb6318556b0d2a1f08875 Mon Sep 17 00:00:00 2001 From: Saikari Date: Sun, 1 Feb 2026 17:07:53 +0300 Subject: refactor: update PowerShell test commands to use a unified run_stdin format. Maybe would work with APE file format? --- tests/modules/stdin/test.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/modules/stdin/test.lua b/tests/modules/stdin/test.lua index 96d166591..bf51a5cd2 100644 --- a/tests/modules/stdin/test.lua +++ b/tests/modules/stdin/test.lua @@ -98,31 +98,32 @@ function main(t) end if pwsh ~= "" then + local run_stdin = string.format('env "%s" l --stdin', xmake) test_shell( "pwsh_single", - string.format('%s -c "echo \\"print(\'hello_pwsh\')\\" | sh -c \\"%s l --stdin\\""', pwsh, xmake), + string.format('%s -c "echo \\"print(\'hello_pwsh\')\\" | %s"', pwsh, run_stdin), "hello_pwsh" ) test_shell( "pwsh_calc", - string.format('%s -c "echo \\"local f = 1+1; print(f)\\" | sh -c \\"%s l --stdin\\""', pwsh, xmake), + string.format('%s -c "echo \\"local f = 1+1; print(f)\\" | %s"', pwsh, run_stdin), "2" ) test_shell( "pwsh_main", string.format( - '%s -c "echo \\"function main() print(\'in_pwsh_main\') end\\" | sh -c \\"%s l --stdin\\""', + '%s -c "echo \\"function main() print(\'in_pwsh_main\') end\\" | %s"', pwsh, - xmake + run_stdin ), "in_pwsh_main" ) test_shell( "pwsh_multi", string.format( - '%s -c "echo \\"print(\'pline1\')\\" \\"print(\'pline2\')\\" | sh -c \\"%s l --stdin\\""', + '%s -c "echo \\"print(\'pline1\')\\" \\"print(\'pline2\')\\" | %s"', pwsh, - xmake + run_stdin ), "pline1[\r\n]+pline2" ) -- cgit v1.3.1