]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | // Copyright (C) 2016 and later: Unicode, Inc. and others. |
2 | // License & terms of use: http://www.unicode.org/copyright.html | |
b75a7d8f A |
3 | //******************************************************************************* |
4 | //* | |
b331163b | 5 | //* Copyright (C) 2002-2015, International Business Machines |
b75a7d8f A |
6 | //* Corporation and others. All Rights Reserved. |
7 | //* | |
8 | //******************************************************************************* | |
9 | ||
10 | ||
11 | // This is a test resource to check whether the aliasing mechanism works | |
12 | // as advertised | |
13 | ||
73c04bcf | 14 | testaliases:table(nofallback) |
b75a7d8f A |
15 | { |
16 | // This should produce an error - circular alias | |
17 | aaa:alias { "testaliases/aab" } // Test circular dependency protection | |
18 | aab:alias { "testaliases/aaa" } | |
19 | ||
20 | // aliasing nonexist position | |
374ca955 | 21 | nonexisting:alias { "/ICUDATA/ja" } |
b75a7d8f A |
22 | |
23 | // aliasing to another resource | |
24 | simplealias:alias { "testtypes/menu/file/open" } // simple referencing | |
25 | ||
26 | // alias that uses another alias and references parts of the end structure | |
374ca955 | 27 | referencingalias:alias { "testaliases/anotheralias/2" } // Referencing through another alias |
b331163b | 28 | anotheralias:alias { "/ICUDATA/ja_JP/calendar/gregorian/DateTimePatterns" } // Provoke a fallback too |
374ca955 | 29 | |
b331163b | 30 | DateTimePatterns:alias { "/ICUDATA/ja/calendar/gregorian/DateTimePatterns" } |
b75a7d8f A |
31 | |
32 | // aliasing using position | |
51004dcb | 33 | boundaries:alias { "/ICUDATA-brkitr/th" } // Referencing corresponding resource in another bundle |
b75a7d8f A |
34 | |
35 | // aliasing arrays | |
36 | zoneTests { | |
729e4ab9 A |
37 | zoneAlias:alias { "/ICUDATA-zone/en/zoneStrings" } // Referencing by index |
38 | zoneAlias1:alias { "/ICUDATA-zone/en/zoneStrings/3" } // Referencing by index | |
39 | zoneAlias2:alias { "/ICUDATA-zone/en/zoneStrings/3/0" } // Referencing by index | |
b75a7d8f A |
40 | } |
41 | ||
42 | // Test aliasing parts of an array using position | |
43 | zoneStrings { | |
44 | :alias { "/ICUDATA/en" } | |
45 | :alias { "/ICUDATA/en" } | |
46 | } | |
47 | // WARNING: this test assumes that on all platforms digits sort normally | |
48 | // if not, the test may fail | |
49 | testGetStringByKeyAliasing { | |
73c04bcf A |
50 | KeyAlias0PST:alias { "te/zoneStrings/2/0" } //"America/Los_Angeles", |
51 | KeyAlias1PacificStandardTime:alias { "te/zoneStrings/2/1" } //"Pacific Standard Time", | |
52 | KeyAlias2PDT:alias { "te/zoneStrings/2/4" } //"PDT", | |
53 | KeyAlias3LosAngeles:alias { "te/zoneStrings/2/5" } //"Los Angeles", | |
b75a7d8f A |
54 | } |
55 | testGetStringByIndexAliasing { | |
73c04bcf A |
56 | :alias { "te/zoneStrings/2/0" } //"America/Los_Angeles", |
57 | :alias { "te/zoneStrings/2/1" } //"Pacific Standard Time", | |
58 | :alias { "te/zoneStrings/2/4" } //"PDT", | |
59 | :alias { "te/zoneStrings/2/5" } //"Los Angeles", | |
b75a7d8f | 60 | } |
73c04bcf | 61 | testAliasToTree:alias{"/ICUDATA-coll/en/collations"} |
b75a7d8f A |
62 | |
63 | } | |
64 | ||
65 | //eof | |
66 | ||
67 |