xref: /freebsd/contrib/bc/vs/tests/tests_dc.bat (revision 43a5ec4eb41567cc92586503212743d89686d78f)
1@echo off
2
3set scripts=..\..\tests\dc
4set dc=%~dp0\dc.exe
5set args=-x
6
7del /f /q *.txt > NUL
8
9
10rem excluded: all, errors, read_errors
11
12for %%i in (
13abs
14add
15boolean
16decimal
17divide
18divmod
19engineering
20exec_stack_len
21length
22misc
23modexp
24modulus
25multiply
26negate
27places
28power
29rand
30read
31scientific
32shift
33sqrt
34stack_len
35stdin
36strings
37subtract
38trunc
39vars
40) do (
41if exist "%scripts%\%%i.txt" (
42	"%dc%" "%args%" < "%scripts%\%%i.txt" > "%%i_results.txt"
43
44	if errorlevel 1 (
45		echo FAIL_RUNTIME: %%i
46		goto :eof
47	)
48
49	fc.exe "%scripts%\%%i_results.txt" "%%i_results.txt" > NUL
50
51	if errorlevel 1 (
52		echo FAIL_RESULTS: %%i
53		goto :eof
54	)
55
56	echo PASS: %%i
57) else (
58	echo FAIL_NOT_EXIST: %%i
59	goto :eof
60)
61)