aboutsummaryrefslogtreecommitdiff
path: root/vs/tests/tests_dc.bat
blob: 36c97daa4e112e30bf5789b40608d8132bd8ee05 (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@echo off

set scripts=..\..\tests\dc
set dc=%~dp0\dc.exe
set args=-x

del /f /q *.txt > NUL


rem excluded: all, errors, read_errors

for %%i in (
abs
add
boolean
decimal
divide
divmod
engineering
exec_stack_len
length
misc
modexp
modulus
multiply
negate
places
power
rand
read
scientific
shift
sqrt
stack_len
stdin
strings
subtract
trunc
vars
) do (
if exist "%scripts%\%%i.txt" (
	"%dc%" "%args%" < "%scripts%\%%i.txt" > "%%i_results.txt"
	
	if errorlevel 1 (
		echo FAIL_RUNTIME: %%i
		goto :eof
	)
	
	fc.exe "%scripts%\%%i_results.txt" "%%i_results.txt" > NUL
	
	if errorlevel 1 (
		echo FAIL_RESULTS: %%i
		goto :eof
	)

	echo PASS: %%i
) else (
	echo FAIL_NOT_EXIST: %%i
	goto :eof
)
)