@ECHO OFF
SETLOCAL

IF NOT EXIST testOut\ mkdir testOut

SET PROG=tclsh ..\poApps.tcl
IF NOT "%1"=="" SET PROG=%1

SET OPT=--office --nosaveonexit --config ConfigDir --verbose --batch
SET DIR=testIn
SET OFFDIR=testIn\OfficeFormats

ECHO %PROG% %OPT% %OFFDIR%\Cawt.pptx
CALL %PROG% %OPT% %OFFDIR%\Cawt.pptx
IF NOT "%ERRORLEVEL%"=="0" ECHO ErrorCode correct file: %ERRORLEVEL%

ECHO %PROG% %OPT% %OFFDIR%\Cawt.xlsx
CALL %PROG% %OPT% %OFFDIR%\Cawt.xlsx
IF NOT "%ERRORLEVEL%"=="0" ECHO ErrorCode correct file: %ERRORLEVEL%

ECHO %PROG% %OPT% %DIR%\Holidays.hol
CALL %PROG% %OPT% %DIR%\Holidays.hol
IF NOT "%ERRORLEVEL%"=="0" ECHO ErrorCode correct file: %ERRORLEVEL%

ECHO %PROG% %OPT% %DIR%\HolidaysUnicode.hol
CALL %PROG% %OPT% %DIR%\HolidaysUnicode.hol
IF NOT "%ERRORLEVEL%"=="0" ECHO ErrorCode correct file: %ERRORLEVEL%
