Add some tests for new syntax

X-SVN-Rev: 522
This commit is contained in:
Alan Liu 2000-01-11 02:35:07 +00:00
parent e8241fdc61
commit 8d57838cc5
2 changed files with 32 additions and 0 deletions

View file

@ -147,6 +147,22 @@ public class TransliteratorTest extends IntlTest {
// }
// }
/**
* Test inline set syntax and set variable syntax.
*/
public void TestInlineSet() {
expect("[:Ll:] (x) > y; [:Ll:] > z;", "aAbxq", "zAyzz");
expect("a[0-9]b > qrs", "1a7b9", "1qrs9");
expect("digit = [0-9];" +
"alpha = [a-zA-Z];" +
"alphanumeric = [{digit}{alpha}];" + // ***
"special = [^{alphanumeric}];" + // ***
"{alphanumeric} > -;" +
"{special} > *;",
"thx-1138", "---*----");
}
/**
* Create some inverses and confirm that they work. We have to be

View file

@ -147,6 +147,22 @@ public class TransliteratorTest extends IntlTest {
// }
// }
/**
* Test inline set syntax and set variable syntax.
*/
public void TestInlineSet() {
expect("[:Ll:] (x) > y; [:Ll:] > z;", "aAbxq", "zAyzz");
expect("a[0-9]b > qrs", "1a7b9", "1qrs9");
expect("digit = [0-9];" +
"alpha = [a-zA-Z];" +
"alphanumeric = [{digit}{alpha}];" + // ***
"special = [^{alphanumeric}];" + // ***
"{alphanumeric} > -;" +
"{special} > *;",
"thx-1138", "---*----");
}
/**
* Create some inverses and confirm that they work. We have to be