Root/
| 1 | #!/bin/bash |
| 2 | . ./Common |
| 3 | |
| 4 | ############################################################################### |
| 5 | |
| 6 | tst "currency: one currency" <<EOF |
| 7 | !-x |
| 8 | GBP USD 0.615219 |
| 9 | EOF |
| 10 | |
| 11 | expect <<EOF |
| 12 | EOF |
| 13 | |
| 14 | #------------------------------------------------------------------------------ |
| 15 | |
| 16 | tst "currency: two currencies" <<EOF |
| 17 | !-x |
| 18 | EUR USD 1.3214 GBP 1.62542 |
| 19 | GBP USD 0.615219 |
| 20 | EOF |
| 21 | |
| 22 | expect <<EOF |
| 23 | EOF |
| 24 | |
| 25 | #------------------------------------------------------------------------------ |
| 26 | |
| 27 | tst_fail "currency: duplicate currency" <<EOF |
| 28 | !-x |
| 29 | GBP USD 0.615219 |
| 30 | GBP USD 0.615219 |
| 31 | EOF |
| 32 | |
| 33 | expect <<EOF |
| 34 | x:2: exchange GBP -> USD is already defined |
| 35 | EOF |
| 36 | |
| 37 | #------------------------------------------------------------------------------ |
| 38 | |
| 39 | tst_fail "currency: duplicate exchange rate" <<EOF |
| 40 | !-x |
| 41 | EUR USD 1.3214 USD 1.3214 |
| 42 | EOF |
| 43 | |
| 44 | expect <<EOF |
| 45 | x:1: exchange EUR -> USD is already defined |
| 46 | EOF |
| 47 | |
| 48 | ############################################################################### |
| 49 |
Branches:
master
