Several new unit tests

This commit is contained in:
Simon Brooke 2018-12-07 06:32:51 +00:00
parent 1307c65e94
commit 15ded8c821
5 changed files with 65 additions and 0 deletions

17
unit-tests/eval-real.sh Normal file
View file

@ -0,0 +1,17 @@
#!/bin/bash
# for this test, trailing zeros can be ignored
expected='5.05'
actual=`echo "(eval 5.05)" |\
target/psse 2> /dev/null |\
sed 's/0*$//' |\
head -2 |\
tail -1`
if [ "${expected}" = "${actual}" ]
then
echo "OK"
else
echo "Fail: expected '${expected}', got '${actual}'"
exit 1
fi