Modified the file path of UnicodeData-3.0.0.0.txt to
either 1) the system property of UnicodeData, if the value is not null or 2) the default path to the common data file data/unicode/UnicodeData.txt X-SVN-Rev: 3409
This commit is contained in:
parent
e9900836ea
commit
d25be78a9d
@ -5,8 +5,8 @@
|
|||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*
|
*
|
||||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/lang/UCharacterTest.java,v $
|
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/lang/UCharacterTest.java,v $
|
||||||
* $Date: 2000/12/26 20:01:08 $
|
* $Date: 2001/01/12 00:53:34 $
|
||||||
* $Revision: 1.1 $
|
* $Revision: 1.2 $
|
||||||
*
|
*
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
@ -403,7 +403,11 @@ public final class UCharacterTest extends TestFmwk
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for the character types, direction
|
* Tests for the character types, direction.<br>
|
||||||
|
* This method reads in UnicodeData.txt file for testing purposes. A default
|
||||||
|
* path is provided relative to the class path, however if the user could
|
||||||
|
* set a system property to change the path.<br>
|
||||||
|
* e.g. java -DUnicodeData="anyfile.dat" com.ibm.icu.test.text.UCharacterTest
|
||||||
*/
|
*/
|
||||||
public void TestCatDir()
|
public void TestCatDir()
|
||||||
{
|
{
|
||||||
@ -416,10 +420,14 @@ public final class UCharacterTest extends TestFmwk
|
|||||||
final String DIR =
|
final String DIR =
|
||||||
"L R EN ES ET AN CS B S WS ON LRE LRO AL RLE RLO PDF NSM BN ";
|
"L R EN ES ET AN CS B S WS ON LRE LRO AL RLE RLO PDF NSM BN ";
|
||||||
|
|
||||||
StringBuffer file = new StringBuffer("UnicodeData-");
|
// default unicode data file name
|
||||||
file.append(UCharacter.getUnicodeVersion());
|
final String UNICODE_DATA_FILE = "data//unicode//UnicodeData.txt";
|
||||||
file.append(".txt");
|
|
||||||
String s;
|
// unicode data file path system name
|
||||||
|
final String UNICODE_DATA_SYSTEM_NAME = "UnicodeData";
|
||||||
|
String s = System.getProperty(UNICODE_DATA_SYSTEM_NAME);
|
||||||
|
if (s == null)
|
||||||
|
s = UNICODE_DATA_FILE;
|
||||||
|
|
||||||
final int LASTUNICODECHAR = 0xFFFD;
|
final int LASTUNICODECHAR = 0xFFFD;
|
||||||
int ch = 0,
|
int ch = 0,
|
||||||
@ -430,7 +438,7 @@ public final class UCharacterTest extends TestFmwk
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// reading in the UnicodeData file
|
// reading in the UnicodeData file
|
||||||
FileReader fr = new FileReader(file.toString());
|
FileReader fr = new FileReader(s);
|
||||||
BufferedReader input = new BufferedReader(fr);
|
BufferedReader input = new BufferedReader(fr);
|
||||||
|
|
||||||
while (ch != LASTUNICODECHAR)
|
while (ch != LASTUNICODECHAR)
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*
|
*
|
||||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/test/text/Attic/UCharacterTest.java,v $
|
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/test/text/Attic/UCharacterTest.java,v $
|
||||||
* $Date: 2000/12/26 20:01:08 $
|
* $Date: 2001/01/12 00:53:34 $
|
||||||
* $Revision: 1.1 $
|
* $Revision: 1.2 $
|
||||||
*
|
*
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
@ -403,7 +403,11 @@ public final class UCharacterTest extends TestFmwk
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for the character types, direction
|
* Tests for the character types, direction.<br>
|
||||||
|
* This method reads in UnicodeData.txt file for testing purposes. A default
|
||||||
|
* path is provided relative to the class path, however if the user could
|
||||||
|
* set a system property to change the path.<br>
|
||||||
|
* e.g. java -DUnicodeData="anyfile.dat" com.ibm.icu.test.text.UCharacterTest
|
||||||
*/
|
*/
|
||||||
public void TestCatDir()
|
public void TestCatDir()
|
||||||
{
|
{
|
||||||
@ -416,10 +420,14 @@ public final class UCharacterTest extends TestFmwk
|
|||||||
final String DIR =
|
final String DIR =
|
||||||
"L R EN ES ET AN CS B S WS ON LRE LRO AL RLE RLO PDF NSM BN ";
|
"L R EN ES ET AN CS B S WS ON LRE LRO AL RLE RLO PDF NSM BN ";
|
||||||
|
|
||||||
StringBuffer file = new StringBuffer("UnicodeData-");
|
// default unicode data file name
|
||||||
file.append(UCharacter.getUnicodeVersion());
|
final String UNICODE_DATA_FILE = "data//unicode//UnicodeData.txt";
|
||||||
file.append(".txt");
|
|
||||||
String s;
|
// unicode data file path system name
|
||||||
|
final String UNICODE_DATA_SYSTEM_NAME = "UnicodeData";
|
||||||
|
String s = System.getProperty(UNICODE_DATA_SYSTEM_NAME);
|
||||||
|
if (s == null)
|
||||||
|
s = UNICODE_DATA_FILE;
|
||||||
|
|
||||||
final int LASTUNICODECHAR = 0xFFFD;
|
final int LASTUNICODECHAR = 0xFFFD;
|
||||||
int ch = 0,
|
int ch = 0,
|
||||||
@ -430,7 +438,7 @@ public final class UCharacterTest extends TestFmwk
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// reading in the UnicodeData file
|
// reading in the UnicodeData file
|
||||||
FileReader fr = new FileReader(file.toString());
|
FileReader fr = new FileReader(s);
|
||||||
BufferedReader input = new BufferedReader(fr);
|
BufferedReader input = new BufferedReader(fr);
|
||||||
|
|
||||||
while (ch != LASTUNICODECHAR)
|
while (ch != LASTUNICODECHAR)
|
||||||
|
Loading…
Reference in New Issue
Block a user