mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 08:19:42 +02:00
b2/test/curr: currency exchange test
This commit is contained in:
parent
dd727b1a8c
commit
0ba0abb74b
52
b2/test/curr
Executable file
52
b2/test/curr
Executable file
@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
. ./Common
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
tst "currency: one currency" <<EOF
|
||||||
|
; /* no hierarchy */
|
||||||
|
!-x
|
||||||
|
GBP USD 0.615219
|
||||||
|
EOF
|
||||||
|
|
||||||
|
expect <<EOF
|
||||||
|
EOF
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
tst "currency: two currencies" <<EOF
|
||||||
|
; /* no hierarchy */
|
||||||
|
!-x
|
||||||
|
EUR USD 1.3214 GBP 1.62542
|
||||||
|
GBP USD 0.615219
|
||||||
|
EOF
|
||||||
|
|
||||||
|
expect <<EOF
|
||||||
|
EOF
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
tst_fail "currency: duplicate currency" <<EOF
|
||||||
|
; /* no hierarchy */
|
||||||
|
!-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
|
||||||
|
; /* no hierarchy */
|
||||||
|
!-x
|
||||||
|
EUR USD 1.3214 USD 1.3214
|
||||||
|
EOF
|
||||||
|
|
||||||
|
expect <<EOF
|
||||||
|
x:1: exchange EUR -> USD is already defined
|
||||||
|
EOF
|
||||||
|
|
||||||
|
###############################################################################
|
Loading…
Reference in New Issue
Block a user