ICU-11535 test genrb -e with UTF-16BE not ISCII

X-SVN-Rev: 37082
This commit is contained in:
Markus Scherer 2015-02-26 22:48:16 +00:00
parent bdc5e5e3f0
commit 7115587929
6 changed files with 15 additions and 38 deletions

2
.gitattributes vendored
View File

@ -192,8 +192,8 @@ icu4c/source/test/perf/utfperf/utfperf.vcxproj -text
icu4c/source/test/perf/utfperf/utfperf.vcxproj.filters -text
icu4c/source/test/perf/utrie2perf/utrie2perf.vcxproj -text
icu4c/source/test/testdata/TestFont1.otf -text
icu4c/source/test/testdata/encoded.utf16be -text
icu4c/source/test/testdata/importtest.bin -text
icu4c/source/test/testdata/iscii.bin -text
icu4c/source/test/testdata/old_e_testtypes.res -text
icu4c/source/test/testdata/old_l_testtypes.res -text
icu4c/source/test/testdata/uni-text.bin -text

View File

@ -1,6 +1,6 @@
/********************************************************************
* COPYRIGHT:
* Copyright (c) 1997-2014, International Business Machines Corporation and
* Copyright (c) 1997-2015, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/*******************************************************************************
@ -424,14 +424,10 @@ static void TestDecodedBundle(){
/* pre-flight */
int32_t num =0;
const char *testdatapath = loadTestData(&error);
resB = ures_open(testdatapath, "iscii", &error);
resB = ures_open(testdatapath, "encoded", &error);
srcFromRes=tres_getString(resB,-1,"str",&len,&error);
if(U_FAILURE(error)){
#if UCONFIG_NO_LEGACY_CONVERSION
log_info("Couldn't load iscii.bin from test data bundle, (because UCONFIG_NO_LEGACY_CONVERSION is turned on)\n");
#else
log_data_err("Could not find iscii.bin from test data bundle. Error: %s\n", u_errorName(error));
#endif
log_data_err("Could not find encoded.res from test data bundle. Error: %s\n", u_errorName(error));
ures_close(resB);
return;
}

View File

@ -1,6 +1,6 @@
#******************************************************************************
#
# Copyright (C) 1998-2014, International Business Machines
# Copyright (C) 1998-2015, International Business Machines
# Corporation and others. All Rights Reserved.
#
#******************************************************************************
@ -141,7 +141,7 @@ include $(TESTSRCDATADIR)/tstfiles.mk
# TEST_RES_SOURCE comes from tstfiles.mk
TEST_RES = $(TEST_RES_SOURCE) $(TEST_RES_LOCAL) casing.txt mc.txt root.txt sh.txt sh_YU.txt te.txt te_IN.txt te_IN_REVISED.txt testtypes.txt testaliases.txt testempty.txt structLocale.txt idna_rules.txt conversion.txt icuio.txt testtable32.txt metaZones.txt timezoneTypes.txt windowsZones.txt zoneinfo64.txt
TEST_RES_FILES=$(TEST_RES:%.txt=$(TESTBUILDDIR)/%.res) $(TESTBUILDDIR)/iscii.res $(TESTBUILDDIR)/old_l_testtypes.res $(TESTBUILDDIR)/old_e_testtypes.res
TEST_RES_FILES=$(TEST_RES:%.txt=$(TESTBUILDDIR)/%.res) $(TESTBUILDDIR)/encoded.res $(TESTBUILDDIR)/old_l_testtypes.res $(TESTBUILDDIR)/old_e_testtypes.res
ALL_TEST_FILES = $(TEST_DAT_FILES) $(TEST_SPP_FILES) $(TEST_BRK_FILES) $(TEST_CNV_FILES) $(TEST_NRM_FILES) $(TEST_RES_FILES) $(TESTOUTDIR)/$(TESTDT)/nam.typ $(TESTOUTDIR)/$(TESTDT)/zoneinfo64.res
@ -155,7 +155,7 @@ $(TESTBUILDDIR)/testdata.lst: $(SRCLISTDEPS)
done;
build-testdata: build-dir $(ALL_TEST_FILES) $(TESTBUILDDIR)/testdata.lst $(TESTBUILDDIR)/iscii.res
build-testdata: build-dir $(ALL_TEST_FILES) $(TESTBUILDDIR)/testdata.lst $(TESTBUILDDIR)/encoded.res
# test.icu
$(TESTBUILDDIR)/test.icu: $(GENTEST)
@ -201,9 +201,9 @@ $(TESTBUILDDIR)/%.nrm: $(TESTSRCDATADIR)/%.txt $(TOOLBINDIR)/gennorm2$(EXEEXT)
$(TESTBUILDDIR)/%.res: $(TESTSRCDATADIR)/%.txt $(TOOLBINDIR)/genrb$(EXEEXT) $(DAT_FILES)
$(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -q -s $(TESTSRCDATADIR) $(ICU_DATA_OPT) -d $(TESTBUILDDIR) $(<F)
$(TESTBUILDDIR)/iscii.res: $(TESTSRCDATADIR)/iscii.bin $(TOOLBINDIR)/genrb$(EXEEXT)
$(TESTBUILDDIR)/encoded.res: $(TESTSRCDATADIR)/encoded.utf16be $(TOOLBINDIR)/genrb$(EXEEXT)
@echo Testing genrb -e option
@ICU_DATA=$(BUILDDIR) $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -s $(TESTSRCDATADIR) -eISCII,version=0 -d $(TESTBUILDDIR) $(<F) >/dev/null || ( echo "WARNING: could not open ISCII - it may have been disabled." | tee $@ )
ICU_DATA=$(BUILDDIR) $(INVOKE) $(TOOLBINDIR)/genrb $(GENRBOPTS) -s $(TESTSRCDATADIR) -eUTF-16BE -d $(TESTBUILDDIR) $(<F)
@echo Finished testing genrb -e option
################################################################### TYP

Binary file not shown.

View File

@ -1,19 +0,0 @@
//*******************************************************************************
//*
//*Copyright (C)1998-2006 International Business Machines
//*Corporation and others.All Rights Reserved.
//*
//*******************************************************************************
iscii:table(nofallback){
str{
" ï4ï3ÍÝï4ï3Æá×è³å .³á .¬³ .¤ÅèÍÍÆ .³á ¤ÆÝ×ÚÏ 1990 ³ ³¢ÈèÍÞ½Ï-ÈèÏÊ¢ÅÛ ×Þ¸ÆÚ"
"ÈèÏÁÚÑÜ .³á .ÍåµÄÚÆ .³á .ÉÑ×èÔÏÞÈ .ÔÛÕèÔ .Ìᢠ.×ÚÑÚÆÚ .2200 ¤ÏÊ ÏÝÈÍá ÌÞÑèÍ"
"³Ü .4Ô×èÂÝ°¢ .4³Ú .4¨ÂèÈÚÄÆ .4ØåµÚ, .3ºÊ³Û .3³¢ÈèÍÞ½Ï .3³Ú .3³ÝÑ .3ÍåµÄÚÆ .3¦××á"
"³ØÛ ./ºèÍÚÄÚ ./ØåµÚê ./¤ÆÝ×¢ÅÚÆ ./³Ü ./¸ÏÌ ×ÜÌÚ°¢ ÈÏ ÈØÝ¢¸Æá ³á ÑÛ¬ ³¢ÈèÍÞ½Ï"
"¬³ ./¥Ì ./ºÏÞÏ ./ºâ×Ú ÊÆ µÍÚ Øâê ËÚÏ ÌᢠËÜ, ´Ú×³Ï ÌæºÞÄÚ ×ϳÚÏ"
"Æá, ³¢ÈèÍÞ½Ï ³á ÈèÏÍåµ ÈÏ ºÊÏÄ×è ¬¿é ѵÚÍÜ Øâ, ³Û¢ÂÝ ¦×³á ×ÏȽ Äæ¿é"
"ѵÚÆá .2³á .2ÑÛ¬ .2³èÍÚ .2×ÈÚ½ .2ÏÚ×èÂÚ .2¨ÈÑÊèÅ .Øâ, .¤ÃÔÚ .ÔÛÕèÔ .Ìᢠ.³¢ÈèÍÞ½Ï .³Ü"
"×ÉÑÂÚ .3Ô .3ÔÛÉÑÂÚ .3×á .3×ʳ .3Ñá .3³Ï .3³èÍÚ .3ØÌ .3¦×³Ú .3ÍݳèÂÛÈÞÏèÁ .2ÔÛ×èÂÚÏ "
"¤Èá³èÖÛ ³Ï ׳ᢵá ? "
}
}

View File

@ -1,5 +1,5 @@
#**********************************************************************
#* Copyright (C) 1999-2014, International Business Machines Corporation
#* Copyright (C) 1999-2015, International Business Machines Corporation
#* and others. All Rights Reserved.
#**********************************************************************
#
@ -28,7 +28,7 @@ ALL : "$(TESTDATAOUT)\testdata.dat"
TEST_RES_FILES = $(TEST_RES_SOURCE:.txt=.res)
"$(TESTDATAOUT)\testdata.dat" : $(TEST_RES_FILES) "$(TESTDATABLD)\casing.res" "$(TESTDATABLD)\conversion.res" "$(TESTDATABLD)\icuio.res" "$(TESTDATABLD)\mc.res" "$(TESTDATABLD)\structLocale.res" "$(TESTDATABLD)\root.res" "$(TESTDATABLD)\sh.res" "$(TESTDATABLD)\sh_YU.res" "$(TESTDATABLD)\te.res" "$(TESTDATABLD)\te_IN.res" "$(TESTDATABLD)\te_IN_REVISED.res" "$(TESTDATABLD)\testaliases.res" "$(TESTDATABLD)\testtypes.res" "$(TESTDATABLD)\testempty.res" "$(TESTDATABLD)\iscii.res" "$(TESTDATABLD)\idna_rules.res" "$(TESTDATABLD)\test.icu" "$(TESTDATABLD)\testtable32.res" "$(TESTDATABLD)\test1.cnv" "$(TESTDATABLD)\test1bmp.cnv" "$(TESTDATABLD)\test2.cnv" "$(TESTDATABLD)\test3.cnv" "$(TESTDATABLD)\test4.cnv" "$(TESTDATABLD)\test4x.cnv" "$(TESTDATABLD)\test5.cnv" "$(TESTDATABLD)\ibm9027.cnv" "$(TESTDATABLD)\nfscsi.spp" "$(TESTDATABLD)\nfscss.spp" "$(TESTDATABLD)\nfscis.spp" "$(TESTDATABLD)\nfsmxs.spp" "$(TESTDATABLD)\nfsmxp.spp" "$(TESTDATABLD)\testnorm.nrm" "$(TESTDATABLD)\zoneinfo64.res"
"$(TESTDATAOUT)\testdata.dat" : $(TEST_RES_FILES) "$(TESTDATABLD)\casing.res" "$(TESTDATABLD)\conversion.res" "$(TESTDATABLD)\icuio.res" "$(TESTDATABLD)\mc.res" "$(TESTDATABLD)\structLocale.res" "$(TESTDATABLD)\root.res" "$(TESTDATABLD)\sh.res" "$(TESTDATABLD)\sh_YU.res" "$(TESTDATABLD)\te.res" "$(TESTDATABLD)\te_IN.res" "$(TESTDATABLD)\te_IN_REVISED.res" "$(TESTDATABLD)\testaliases.res" "$(TESTDATABLD)\testtypes.res" "$(TESTDATABLD)\testempty.res" "$(TESTDATABLD)\encoded.res" "$(TESTDATABLD)\idna_rules.res" "$(TESTDATABLD)\test.icu" "$(TESTDATABLD)\testtable32.res" "$(TESTDATABLD)\test1.cnv" "$(TESTDATABLD)\test1bmp.cnv" "$(TESTDATABLD)\test2.cnv" "$(TESTDATABLD)\test3.cnv" "$(TESTDATABLD)\test4.cnv" "$(TESTDATABLD)\test4x.cnv" "$(TESTDATABLD)\test5.cnv" "$(TESTDATABLD)\ibm9027.cnv" "$(TESTDATABLD)\nfscsi.spp" "$(TESTDATABLD)\nfscss.spp" "$(TESTDATABLD)\nfscis.spp" "$(TESTDATABLD)\nfsmxs.spp" "$(TESTDATABLD)\nfsmxp.spp" "$(TESTDATABLD)\testnorm.nrm" "$(TESTDATABLD)\zoneinfo64.res"
@echo Building test data
@copy "$(TESTDATABLD)\te.res" "$(TESTDATAOUT)\$(TESTDT)\nam.typ"
@copy "$(TESTDATA)\old_l_testtypes.res" "$(TESTDATABLD)"
@ -52,7 +52,7 @@ testempty.res
testaliases.res
structLocale.res
icuio.res
iscii.res
encoded.res
test.icu
test1.cnv
test1bmp.cnv
@ -81,9 +81,9 @@ $(TEST_RES_FILES:.res =.res
@echo Making Test Resource Bundle files $<
@"$(ICUTOOLS)\genrb\$(CFG)\genrb" -q -s"$(TESTDATA)" -d"$(TESTDATABLD)" $<
"$(TESTDATABLD)\iscii.res": "$(TESTDATA)\iscii.bin"
@echo Making Test Resource Bundle file with encoding ISCII,version=0
@"$(ICUTOOLS)\genrb\$(CFG)\genrb" -s"$(TESTDATA)" -eISCII,version=0 -d"$(TESTDATABLD)" iscii.bin
"$(TESTDATABLD)\encoded.res": "$(TESTDATA)\encoded.utf16be"
@echo Making Test Resource Bundle file with encoding
"$(ICUTOOLS)\genrb\$(CFG)\genrb" -s"$(TESTDATA)" -eUTF-16BE -d"$(TESTDATABLD)" encoded.utf16be
"$(TESTDATABLD)\idna_rules.res": "$(TESTDATA)\idna_rules.txt"
@echo Making Test Resource Bundle file for IDNA reference implementation