@echo off
set files=test-declaration.az
set files=%files% test-value.az
set files=%files% test-map.az
set files=%files% test-csv.az
set files=%files% test-Dict.az
set files=%files% test-List.az
rem set files=%files% test-diff.az
rem set files=%files% test-optimize.az
set files=%files% test-object.az
set files=%files% test-operator.az
set files=%files% test-function.az
set files=%files% test-repeater.az
set files=%files% test-block.az
set files=%files% test-re.az
set files=%files% test-string.az
set files=%files% test-application.az
set files=%files% test-error.az
set files=%files% test-formatter.az
set files=%files% test-module.az
set files=%files% test-sqlite3.az
rem set files=%files% test-file.az
for %%F in (%files%) do ..\ascript %%F > result\%%~nF.result.txt
if "%1" == "print" goto print
if "%1" == "update" goto update
if "%1" == "clean" goto clean
for %%F in (%files%) do diff -u result\%%~nF.sample.txt result\%%~nF.result.txt
goto done
:print
for %%F in (%files%) do type result\%%~nF.result.txt
goto done
:update
for %%F in (%files%) do copy result\%%~nF.result.txt result\%%~nF.sample.txt >NUL
goto done
:clean
for %%F in (%files%) do del result\%%~nF.result.txt
goto done
:done
