Several new unit tests
This commit is contained in:
parent
1307c65e94
commit
15ded8c821
5 changed files with 65 additions and 0 deletions
17
unit-tests/eval-real.sh
Normal file
17
unit-tests/eval-real.sh
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue