]>
Commit | Line | Data |
---|---|---|
49cc7edb SW |
1 | #!/bin/bash |
2 | ||
3 | exit_status=0 | |
4 | ||
5 | function t() { | |
6 | expected=$1 | |
7 | shift | |
8 | diff -u --label Expected <( echo -n "$expected" ) \ | |
9 | --label Actual <( ./planeteer "$@" ) || exit_status=1 | |
10 | } | |
11 | ||
12 | t ' 850,000 Buy 300 Medical Units | |
13 | 850,000 Jump from Earth to Sickonia (2 hyper jump units) | |
14 | 3,220,600 Sell 300 Medical Units | |
15 | 2,770,600 Buy 300 Heating Units | |
16 | 2,770,600 Jump from Sickonia to Hothor (2 hyper jump units) | |
17 | 5,200,600 Sell 300 Heating Units | |
18 | 4,999,600 Buy 300 Medical Units | |
19 | 4,999,600 Jump from Hothor to Sickonia (2 hyper jump units) | |
20 | 7,370,200 Sell 300 Medical Units | |
21 | 6,920,200 Buy 300 Heating Units | |
22 | 6,920,200 Jump from Sickonia to Hothor (2 hyper jump units) | |
23 | 9,350,200 Sell 300 Heating Units | |
24 | 9,149,200 Buy 300 Medical Units | |
25 | 9,149,200 Jump from Hothor to Sickonia (2 hyper jump units) | |
26 | 11,519,800 Sell 300 Medical Units | |
27 | 11,069,800 Buy 300 Heating Units | |
28 | 11,069,800 Jump from Sickonia to Hothor (2 hyper jump units) | |
29 | 13,499,800 Sell 300 Heating Units | |
30 | 13,298,800 Buy 300 Medical Units | |
31 | 13,298,800 Jump from Hothor to Sickonia (2 hyper jump units) | |
32 | 15,669,400 Sell 300 Medical Units | |
33 | 15,219,400 Buy 300 Heating Units | |
34 | 15,219,400 Jump from Sickonia to Hothor (2 hyper jump units) | |
35 | 17,649,400 Sell 300 Heating Units | |
36 | ' --funds 1000000 --start Earth | |
37 | ||
38 | t '' --funds 1000000 --start Earth --fuel 0 | |
39 | ||
40 | t ' 850,000 Buy 300 Medical Units | |
41 | 850,000 Jump from Earth to HomeWorld (2 hyper jump units) | |
42 | 3,256,900 Sell 300 Medical Units | |
43 | ' --funds 1000000 --start Earth --fuel 2 | |
44 | ||
45 | t ' 850,000 Buy 300 Medical Units | |
46 | 850,000 Jump from Earth to Sickonia (2 hyper jump units) | |
47 | 3,220,600 Sell 300 Medical Units | |
48 | 2,770,600 Buy 300 Heating Units | |
49 | 2,770,600 Jump from Sickonia to Hothor (2 hyper jump units) | |
50 | 5,200,600 Sell 300 Heating Units | |
51 | ' --funds 1000000 --start Earth --fuel 4 | |
52 | ||
53 | t ' 850,000 Buy 300 Medical Units | |
54 | 850,000 Jump from Earth to Sickonia (2 hyper jump units) | |
55 | 3,220,600 Sell 300 Medical Units | |
56 | 2,770,600 Buy 300 Heating Units | |
57 | 2,770,600 Jump from Sickonia to Hothor (2 hyper jump units) | |
58 | 5,200,600 Sell 300 Heating Units | |
59 | 4,999,600 Buy 300 Medical Units | |
60 | 4,999,600 Jump from Hothor to HomeWorld (2 hyper jump units) | |
61 | 7,406,500 Sell 300 Medical Units | |
62 | ' --funds 1000000 --start Earth --fuel 6 | |
63 | ||
64 | exit "$exit_status" |