| |
|
1 |
ad_library { |
| |
|
2 |
Automated tests for the ref-countries package. |
| |
|
3 |
|
| |
|
4 |
@author Héctor Romojaro <hector.romojaro@gmail.com> |
| |
|
5 |
@creation-date 2020-08-20 |
| |
|
6 |
@cvs-id $Id$ |
| |
|
7 |
} |
| |
|
8 |
|
| |
|
9 |
aa_register_case -procs { |
| |
|
10 |
ref_countries::get_country_code |
| |
|
11 |
} -cats { |
| |
|
12 |
api |
| |
|
13 |
production_safe |
| |
|
14 |
} get_country_code { |
| |
|
15 |
Test ref_countries::get_country_code proc. |
| |
|
16 |
} { |
| |
|
17 |
# |
| |
|
18 |
# Check a list of countries |
| |
|
19 |
# |
| |
|
20 |
set countries {England GB "Great Britain" GB Spain ES "Côte d'Ivoire" CI "Western Sahara" EH} |
| |
|
21 |
dict for {country code} $countries { |
| |
|
22 |
aa_equals "Country code for $country:" "[ref_countries::get_country_code -country $country]" "$code" |
| |
|
23 |
} |
| |
|
24 |
} |
| |
|
25 |
|
| |
|
26 |
# Local variables: |
| |
|
27 |
# mode: tcl |
| |
|
28 |
# tcl-indent-level: 4 |
| |
|
29 |
# indent-tabs-mode: nil |
| |
|
30 |
# End: |