]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | //******************************************************************************* |
2 | //* | |
3 | //* Copyright (C) 2002-2003, International Business Machines | |
4 | //* Corporation and others. All Rights Reserved. | |
5 | //* | |
6 | //******************************************************************************* | |
7 | ||
8 | ||
9 | // This is a test resource to check whether the aliasing mechanism works | |
10 | // as advertised | |
11 | ||
12 | testaliases | |
13 | { | |
14 | // This should produce an error - circular alias | |
15 | aaa:alias { "testaliases/aab" } // Test circular dependency protection | |
16 | aab:alias { "testaliases/aaa" } | |
17 | ||
18 | // aliasing nonexist position | |
19 | nonexisting:alias { "/ICUDATA/uk" } | |
20 | ||
21 | // aliasing to another resource | |
22 | simplealias:alias { "testtypes/menu/file/open" } // simple referencing | |
23 | ||
24 | // alias that uses another alias and references parts of the end structure | |
25 | referencingalias:alias { "testaliases/anotheralias/Sequence" } // Referencing through another alias | |
26 | anotheralias:alias { "/ICUDATA/uk/CollationElements" } | |
27 | ||
28 | // aliasing using position | |
29 | CollationElements:alias { "/ICUDATA/uk" } // Referencing corresponding resource in another bundle | |
30 | ||
31 | // aliasing arrays | |
32 | zoneTests { | |
33 | zoneAlias:alias { "/ICUDATA/en/zoneStrings" } // Referencing by index | |
34 | zoneAlias1:alias { "/ICUDATA/en/zoneStrings/3" } // Referencing by index | |
35 | zoneAlias2:alias { "/ICUDATA/en/zoneStrings/3/0" } // Referencing by index | |
36 | } | |
37 | ||
38 | // Test aliasing parts of an array using position | |
39 | zoneStrings { | |
40 | :alias { "/ICUDATA/en" } | |
41 | :alias { "/ICUDATA/en" } | |
42 | } | |
43 | // WARNING: this test assumes that on all platforms digits sort normally | |
44 | // if not, the test may fail | |
45 | testGetStringByKeyAliasing { | |
46 | KeyAlias0PST:alias { "/ICUDATA/en/zoneStrings/0/0" } //"PST", | |
47 | KeyAlias1PacificStandardTime:alias { "/ICUDATA/en/zoneStrings/0/1" } //"Pacific Standard Time", | |
48 | KeyAlias2PDT:alias { "/ICUDATA/en/zoneStrings/0/4" } //"PDT", | |
49 | KeyAlias3LosAngeles:alias { "/ICUDATA/en/zoneStrings/0/5" } //"Los Angeles", | |
50 | } | |
51 | testGetStringByIndexAliasing { | |
52 | :alias { "/ICUDATA/en/zoneStrings/0/0" } //"PST", | |
53 | :alias { "/ICUDATA/en/zoneStrings/0/1" } //"Pacific Standard Time", | |
54 | :alias { "/ICUDATA/en/zoneStrings/0/4" } //"PDT", | |
55 | :alias { "/ICUDATA/en/zoneStrings/0/5" } //"Los Angeles", | |
56 | } | |
57 | ||
58 | } | |
59 | ||
60 | //eof | |
61 | ||
62 |