Root/b2/test/curr

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

Archive Download this file

Branches:
master



interactive