Here is my code
set list=test
del /Q failed_tests.txt
FOR %%a IN (%list%) DO (
%%a > output_%%a.txt
FINDSTR /C:"[----------]" output_%%a.txt > check_run.txt
for /f "delims=" %%x in (check_run.txt) do (
set content=%%x
)
if not %content%=="[----------]" (
echo Test Does Not Run >> failed_tests.txt
) else (
echo Test Runs >> failed_tests.txt
)
)
type failed_tests.txt
content seems to always be set to "[----------]". However when output_test.txt/check_run.txt doesn't contain "[----------]" it should be set to an empty string.
set "content="beforefor /f "delims=" %%xloop. 2.You need to enable Delayed Expansion and then useif not "!content!"=="[----------]"(note proper quoting). Forceecho ONto see what happen...