This once again does NOT compile. I've done work on macros; they don't work yet..
This commit is contained in:
parent
e3f922a8bf
commit
2b22780ccf
86 changed files with 279 additions and 153 deletions
21
unit-tests/eval-real.sh
Executable file
21
unit-tests/eval-real.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/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*$//' |\
|
||||
tail -1`
|
||||
|
||||
# one part in a million is close enough...
|
||||
outcome=`echo "sqrt((${expected} - ${actual})^2) < 0.0000001" | bc`
|
||||
|
||||
if [ "${outcome}" = "1" ]
|
||||
then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Fail: expected '${expected}', got '${actual}'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue