ICU-1948 new test file - testaliases.txt, used in cintltst

X-SVN-Rev: 8937
This commit is contained in:
Vladimir Weinstein 2002-06-24 21:00:08 +00:00
parent e594347bf5
commit c92373eed9
3 changed files with 50 additions and 2 deletions

View file

@ -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

View 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

View file

@ -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