@echo off
if "%1"=="" (set TEST=??) else (set TEST=%1)
set TASK=counts
pushd ..
if NOT exist %TASK%_am.exe call cs %TASK%_am.dpr
popd
for %%i in (%TEST%) do (
echo Test %%i:
pushd ..
copy tests\%%i %TASK%.in >nul
%TASK%_am
copy %TASK%.out tests\%%i.b >nul
popd
check %%i %%i.b %%i.a
)
