mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-12-25 15:15:11 +02:00
49 lines
921 B
Plaintext
49 lines
921 B
Plaintext
|
#!/bin/bash
|
||
|
. ./Common
|
||
|
|
||
|
###############################################################################
|
||
|
|
||
|
tst "currency: one currency" <<EOF
|
||
|
!-x
|
||
|
GBP USD 0.615219
|
||
|
EOF
|
||
|
|
||
|
expect <<EOF
|
||
|
EOF
|
||
|
|
||
|
#------------------------------------------------------------------------------
|
||
|
|
||
|
tst "currency: two currencies" <<EOF
|
||
|
!-x
|
||
|
EUR USD 1.3214 GBP 1.62542
|
||
|
GBP USD 0.615219
|
||
|
EOF
|
||
|
|
||
|
expect <<EOF
|
||
|
EOF
|
||
|
|
||
|
#------------------------------------------------------------------------------
|
||
|
|
||
|
tst_fail "currency: duplicate currency" <<EOF
|
||
|
!-x
|
||
|
GBP USD 0.615219
|
||
|
GBP USD 0.615219
|
||
|
EOF
|
||
|
|
||
|
expect <<EOF
|
||
|
x:2: exchange GBP -> USD is already defined
|
||
|
EOF
|
||
|
|
||
|
#------------------------------------------------------------------------------
|
||
|
|
||
|
tst_fail "currency: duplicate exchange rate" <<EOF
|
||
|
!-x
|
||
|
EUR USD 1.3214 USD 1.3214
|
||
|
EOF
|
||
|
|
||
|
expect <<EOF
|
||
|
x:1: exchange EUR -> USD is already defined
|
||
|
EOF
|
||
|
|
||
|
###############################################################################
|