summaryrefslogtreecommitdiffstats
path: root/intl/icu/source/test/testdata/testaliases.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /intl/icu/source/test/testdata/testaliases.txt
parentInitial commit. (diff)
downloadfirefox-esr-upstream.tar.xz
firefox-esr-upstream.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'intl/icu/source/test/testdata/testaliases.txt')
-rw-r--r--intl/icu/source/test/testdata/testaliases.txt67
1 files changed, 67 insertions, 0 deletions
diff --git a/intl/icu/source/test/testdata/testaliases.txt b/intl/icu/source/test/testdata/testaliases.txt
new file mode 100644
index 0000000000..1c2237e978
--- /dev/null
+++ b/intl/icu/source/test/testdata/testaliases.txt
@@ -0,0 +1,67 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+//*******************************************************************************
+//*
+//* Copyright (C) 2002-2015, International Business Machines
+//* Corporation and others. All Rights Reserved.
+//*
+//*******************************************************************************
+
+
+// This is a test resource to check whether the aliasing mechanism works
+// as advertised
+
+testaliases:table(nofallback)
+{
+ // This should produce an error - circular alias
+ aaa:alias { "testaliases/aab" } // Test circular dependency protection
+ aab:alias { "testaliases/aaa" }
+
+ // aliasing nonexist position
+ nonexisting:alias { "/ICUDATA/ja" }
+
+ // aliasing to another resource
+ simplealias:alias { "testtypes/menu/file/open" } // simple referencing
+
+ // alias that uses another alias and references parts of the end structure
+ referencingalias:alias { "testaliases/anotheralias/2" } // Referencing through another alias
+ anotheralias:alias { "/ICUDATA/ja_JP/calendar/gregorian/DateTimePatterns" } // Provoke a fallback too
+
+ DateTimePatterns:alias { "/ICUDATA/ja/calendar/gregorian/DateTimePatterns" }
+
+ // aliasing using position
+ boundaries:alias { "/ICUDATA-brkitr/th" } // Referencing corresponding resource in another bundle
+
+ // aliasing arrays
+ zoneTests {
+ zoneAlias:alias { "/ICUDATA-zone/en/zoneStrings" } // Referencing by index
+ zoneAlias1:alias { "/ICUDATA-zone/en/zoneStrings/3" } // Referencing by index
+ zoneAlias2:alias { "/ICUDATA-zone/en/zoneStrings/3/0" } // Referencing by index
+ }
+
+ // Test aliasing parts of an array using position
+ zoneStrings {
+ :alias { "/ICUDATA/en" }
+ :alias { "/ICUDATA/en" }
+ }
+ // WARNING: this test assumes that on all platforms digits sort normally
+ // if not, the test may fail
+ testGetStringByKeyAliasing {
+ KeyAlias0PST:alias { "te/zoneStrings/2/0" } //"America/Los_Angeles",
+ KeyAlias1PacificStandardTime:alias { "te/zoneStrings/2/1" } //"Pacific Standard Time",
+ KeyAlias2PDT:alias { "te/zoneStrings/2/4" } //"PDT",
+ KeyAlias3LosAngeles:alias { "te/zoneStrings/2/5" } //"Los Angeles",
+ }
+ testGetStringByIndexAliasing {
+ :alias { "te/zoneStrings/2/0" } //"America/Los_Angeles",
+ :alias { "te/zoneStrings/2/1" } //"Pacific Standard Time",
+ :alias { "te/zoneStrings/2/4" } //"PDT",
+ :alias { "te/zoneStrings/2/5" } //"Los Angeles",
+ }
+ testAliasToTree:alias{"/ICUDATA-coll/en/collations"}
+
+}
+
+//eof
+
+