-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_test.cmd
More file actions
31 lines (26 loc) · 967 Bytes
/
Copy pathrun_test.cmd
File metadata and controls
31 lines (26 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@echo off
setlocal EnableDelayedExpansion
set start=%time%
for %%f in (tests/*) do (
echo | set /p=Running %%f...
bin\Compiler.exe tests/%%f -silent
IF !ERRORLEVEL! NEQ 0 echo [36GCompilation [31mfailed![0m
IF !ERRORLEVEL! EQU 0 (
echo | set /p=[36GCompilation [32msuccess[0m...
output\out.exe >NUL
IF !ERRORLEVEL! NEQ 0 echo [60GTest [31mfailed![0m
IF !ERRORLEVEL! EQU 0 echo [60GTest [32msuccess[0m
)
)
echo | set /p=Running error test wrongFilename.fab...
bin\Compiler.exe errortests/wrongFilename.fab >NUL 2>NUL
IF !ERRORLEVEL! EQU 0 echo [55GCompilation [31msucceded![0m
IF !ERRORLEVEL! NEQ 0 echo [55GCompilation [32mfailed[0m
for %%f in (errortests/*) do (
echo | set /p=Running error test %%f...
bin\Compiler.exe errortests/%%f >NUL 2>NUL
IF !ERRORLEVEL! EQU 0 echo [55GCompilation [31msucceded![0m
IF !ERRORLEVEL! NEQ 0 echo [55GCompilation [32mfailed[0m
)
set end=%time%
cmd /c timediff.bat Tests %start% %end%