1// Copyright (C) 2016 and later: Unicode, Inc. and others. 2// License & terms of use: http://www.unicode.org/copyright.html 3//******************************************************************************* 4//* 5//* Copyright (C) 2002-2015, International Business Machines 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 14testaliases:table(nofallback) 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 21 nonexisting:alias { "/ICUDATA/ja" } 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 27 referencingalias:alias { "testaliases/anotheralias/2" } // Referencing through another alias 28 anotheralias:alias { "/ICUDATA/ja_JP/calendar/gregorian/DateTimePatterns" } // Provoke a fallback too 29 30 DateTimePatterns:alias { "/ICUDATA/ja/calendar/gregorian/DateTimePatterns" } 31 32 // aliasing using position 33 boundaries:alias { "/ICUDATA-brkitr/th" } // Referencing corresponding resource in another bundle 34 35 // aliasing arrays 36 zoneTests { 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 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 { 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", 54 } 55 testGetStringByIndexAliasing { 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", 60 } 61 testAliasToTree:alias{"/ICUDATA-coll/en/collations"} 62 63} 64 65//eof 66 67 68