]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | //******************************************************************************* |
2 | //* | |
374ca955 | 3 | //* Copyright (C) 2002-2004, International Business Machines |
b75a7d8f A |
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 | |
374ca955 | 19 | nonexisting:alias { "/ICUDATA/ja" } |
b75a7d8f A |
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 | |
374ca955 A |
25 | referencingalias:alias { "testaliases/anotheralias/2" } // Referencing through another alias |
26 | anotheralias:alias { "/ICUDATA/ja/LocaleScript" } | |
27 | ||
28 | LocaleScript:alias { "/ICUDATA/ja/LocaleScript" } | |
b75a7d8f A |
29 | |
30 | // aliasing using position | |
374ca955 | 31 | BreakDictionaryData:alias { "/ICUDATA/th" } // Referencing corresponding resource in another bundle |
b75a7d8f A |
32 | |
33 | // aliasing arrays | |
34 | zoneTests { | |
35 | zoneAlias:alias { "/ICUDATA/en/zoneStrings" } // Referencing by index | |
36 | zoneAlias1:alias { "/ICUDATA/en/zoneStrings/3" } // Referencing by index | |
37 | zoneAlias2:alias { "/ICUDATA/en/zoneStrings/3/0" } // Referencing by index | |
38 | } | |
39 | ||
40 | // Test aliasing parts of an array using position | |
41 | zoneStrings { | |
42 | :alias { "/ICUDATA/en" } | |
43 | :alias { "/ICUDATA/en" } | |
44 | } | |
45 | // WARNING: this test assumes that on all platforms digits sort normally | |
46 | // if not, the test may fail | |
47 | testGetStringByKeyAliasing { | |
374ca955 | 48 | KeyAlias0PST:alias { "/ICUDATA/en/zoneStrings/0/0" } //"America/Los_Angeles", |
b75a7d8f A |
49 | KeyAlias1PacificStandardTime:alias { "/ICUDATA/en/zoneStrings/0/1" } //"Pacific Standard Time", |
50 | KeyAlias2PDT:alias { "/ICUDATA/en/zoneStrings/0/4" } //"PDT", | |
51 | KeyAlias3LosAngeles:alias { "/ICUDATA/en/zoneStrings/0/5" } //"Los Angeles", | |
52 | } | |
53 | testGetStringByIndexAliasing { | |
374ca955 | 54 | :alias { "/ICUDATA/en/zoneStrings/0/0" } //"America/Los_Angeles", |
b75a7d8f A |
55 | :alias { "/ICUDATA/en/zoneStrings/0/1" } //"Pacific Standard Time", |
56 | :alias { "/ICUDATA/en/zoneStrings/0/4" } //"PDT", | |
57 | :alias { "/ICUDATA/en/zoneStrings/0/5" } //"Los Angeles", | |
58 | } | |
59 | ||
60 | } | |
61 | ||
62 | //eof | |
63 | ||
64 |