format.setTimeZone(rootZone);
}
public void TestPatternParser() {
StringBuffer buffer = new StringBuffer();
PatternTokenizer pp = new PatternTokenizer()
.setIgnorableCharacters(new UnicodeSet("[-]"))
.setSyntaxCharacters(new UnicodeSet("[a-zA-Z]"))
.setEscapeCharacters(new UnicodeSet("[b#]"))
.setUsingQuote(true);
logln("Using Quote");
for (int i = 0; i < patternTestData.length; ++i) {
String patternTest = (String) patternTestData[i];
CheckPattern(buffer, pp, patternTest);
}
String[] randomSet = {"abcdef", "$12!@#-", "'\\"};
for (int i = 0; i < RANDOM_COUNT; ++i) {
String patternTest = getRandomString(randomSet, 0, 10);
CheckPattern(buffer, pp, patternTest);
}
logln("Using Backslash");
pp.setUsingQuote(false).setUsingSlash(true);
for (int i = 0; i < patternTestData.length; ++i) {
String patternTest = (String) patternTestData[i];
CheckPattern(buffer, pp, patternTest);
}
for (int i = 0; i < RANDOM_COUNT; ++i) {