mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-1948 new test file - testaliases.txt, used in cintltst
X-SVN-Rev: 8937
This commit is contained in:
parent
e594347bf5
commit
c92373eed9
3 changed files with 50 additions and 2 deletions
|
@ -166,7 +166,7 @@ TRNS_SRC_FILES=$(TRNS_SOURCE:%=$(TRNSSRCDIR)/%)
|
|||
ALL_RES_SOURCE= $(RES_SOURCE) $(TRNS_SOURCE)
|
||||
RES_FILES = $(ALL_RES_SOURCE:%.txt=$(BUILDDIR)/%.res)
|
||||
|
||||
TEST_RES = casing.txt root.txt te.txt te_IN.txt testtypes.txt testempty.txt DataDrivenCollationTest.txt
|
||||
TEST_RES = casing.txt root.txt te.txt te_IN.txt testaliases.txt testtypes.txt testempty.txt DataDrivenCollationTest.txt
|
||||
TEST_RES_FILES=$(TEST_RES:%.txt=$(TESTBUILDDIR)/%.res)
|
||||
|
||||
INDEX_FILES=$(BUILDDIR)/res_index.txt
|
||||
|
|
47
icu4c/source/test/testdata/testaliases.txt
vendored
Normal file
47
icu4c/source/test/testdata/testaliases.txt
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
//*******************************************************************************
|
||||
//*
|
||||
//* Copyright (C) 2002, International Business Machines
|
||||
//* Corporation and others. All Rights Reserved.
|
||||
//*
|
||||
//*******************************************************************************
|
||||
|
||||
|
||||
// This is a test resource to check whether the aliasing mechanism works
|
||||
// as advertised
|
||||
|
||||
testaliases
|
||||
{
|
||||
// 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/uk" }
|
||||
|
||||
// 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/Sequence" } // Referencing through another alias
|
||||
anotheralias:alias { "/ICUDATA/uk/CollationElements" }
|
||||
|
||||
// aliasing using position
|
||||
CollationElements:alias { "/ICUDATA/uk" } // Referencing corresponding resource in another bundle
|
||||
|
||||
// aliasing arrays
|
||||
zoneTests {
|
||||
zoneAlias:alias { "/ICUDATA/en/zoneStrings" } // Referencing by index
|
||||
zoneAlias1:alias { "/ICUDATA/en/zoneStrings/3" } // Referencing by index
|
||||
zoneAlias2:alias { "/ICUDATA/en/zoneStrings/3/0" } // Referencing by index
|
||||
}
|
||||
|
||||
// Test aliasing parts of an array using position
|
||||
zoneStrings {
|
||||
:alias { "/ICUDATA/en" }
|
||||
:alias { "/ICUDATA/en" }
|
||||
}
|
||||
}
|
||||
|
||||
//eof
|
||||
|
||||
|
3
icu4c/source/test/testdata/testdata.mk
vendored
3
icu4c/source/test/testdata/testdata.mk
vendored
|
@ -11,7 +11,7 @@
|
|||
ALL : "$(TESTDATAOUT)\testdata.dat"
|
||||
@echo Test data is built.
|
||||
|
||||
"$(TESTDATAOUT)\testdata.dat" : "$(TESTDATABLD)\ja_data.res" "$(TESTDATABLD)\casing.res" "$(TESTDATABLD)\root.res" "$(TESTDATABLD)\te.res" "$(TESTDATABLD)\te_IN.res" "$(TESTDATABLD)\testtypes.res" "$(TESTDATABLD)\testempty.res" "$(TESTDATABLD)\ja_data.res" "$(TESTDATAOUT)\DataDrivenCollationTest.res" $(TESTDATAOUT)test.dat
|
||||
"$(TESTDATAOUT)\testdata.dat" : "$(TESTDATABLD)\ja_data.res" "$(TESTDATABLD)\casing.res" "$(TESTDATABLD)\root.res" "$(TESTDATABLD)\te.res" "$(TESTDATABLD)\te_IN.res" "$(TESTDATABLD)\testaliases.res" "$(TESTDATABLD)\testtypes.res" "$(TESTDATABLD)\testempty.res" "$(TESTDATABLD)\ja_data.res" "$(TESTDATAOUT)\DataDrivenCollationTest.res" $(TESTDATAOUT)test.dat
|
||||
@echo Building test data
|
||||
copy "$(TESTDATABLD)\te.res" "$(TESTDATAOUT)\testudata_nam.typ"
|
||||
@"$(ICUTOOLS)\pkgdata\$(CFG)\pkgdata" -v -m common -c -p testdata -O "$(PKGOPT)" -d "$(TESTDATAOUT)" -T "$(TESTDATABLD)" -s "$(TESTDATABLD)" <<
|
||||
|
@ -21,6 +21,7 @@ te.res
|
|||
te_IN.res
|
||||
testtypes.res
|
||||
testempty.res
|
||||
testaliases.res
|
||||
ja_data.res
|
||||
DataDrivenCollationTest.res
|
||||
test.dat
|
||||
|
|
Loading…
Add table
Reference in a new issue