eric pouech (@epo) commented about programs/cmd/tests/test_builtins.cmd:
+:test_for_loop_params_parse +for /F "tokens=1,* delims= " %%a in ("%WINE_ARGS%") do (
- for /F "tokens=1,2 delims==" %%1 in ("%%a") do (
if "%WINE_LOG_LEVEL%" GEQ "2" (
echo [DEBUG] inner argument {%%1, %%2}
)
call :test_for_loop_params_inner %%1 %%2
- )
- set "WINE_ARGS=%%b"
- goto :test_for_loop_params_parse
+) +if not defined WINE_LOG_LEVEL set "WINE_LOG_LEVEL=1" & goto :test_for_loop_params +if "%WINE_LOG_LEVEL%" LSS "2" set "WINE_LOG_LEVEL=2" & goto :test_for_loop_params +goto :test_for_loop_params_end
+:test_for_loop_params_inner
I assume you want to use an external (to the loops) function to check how %1 behave (is properly saved... )
but a simple 'echo %1 %2' would be much simpler (unless I missed something)