freebsd-src/contrib/bc/vs/tests/tests_dc.bat
Stefan Eßer d43fa8ef53 contrib/bc: merge version 5.1.0 from vendor branch
This version adds options and functions that allow to print numbers
in the open interval (-1 .. 1) with or without a leading 0 digit.

Additionally, an option has been added to prevent line wrap and
allows to print arbitrarily long results on a single line.

Merge commit '5d58a51571721190681c50d4bd3a1f45e6282d72'
2021-10-04 22:25:24 +02:00

61 lines
692 B
Batchfile

@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
)
)