Skip to content

Commit 0ecf28d

Browse files
committed
- F Created approve_all.bat
1 parent 6b446dd commit 0ecf28d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

resources/approve_all.bat

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@echo off
2+
3+
FOR /F "usebackq delims=" %%L IN ("..\approvaltests-tests\.approval_tests_temp\.failed_comparison.log") DO (
4+
REM Store the entire line in an environment variable named LINE
5+
SET "LINE=%%L"
6+
REM Call a subroutine to parse and handle the line
7+
CALL :ProcessLine
8+
)
9+
10+
GOTO :EOF
11+
12+
:ProcessLine
13+
REM Enable delayed expansion so we can safely manipulate LINE
14+
SETLOCAL ENABLEDELAYEDEXPANSION
15+
16+
REM Replace " -> " with a pipe character so we can split easily
17+
SET "LINE=!LINE: -> =|!"
18+
19+
REM Now split the line on the pipe and capture each side
20+
FOR /F "tokens=1,2 delims=|" %%A IN ("!LINE!") DO (
21+
ECHO Moving "%%~A" to "%%~B"
22+
MOVE "%%~A" "%%~B"
23+
)
24+
25+
ENDLOCAL
26+
GOTO :EOF

0 commit comments

Comments
 (0)