mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
Add some tests for new syntax
X-SVN-Rev: 522
This commit is contained in:
parent
e8241fdc61
commit
8d57838cc5
2 changed files with 32 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue