[jruby-joni] 77/223: Turn off failing tests for non unicode character class mode for \s \d \w
Hideki Yamane
henrich at moszumanska.debian.org
Mon Nov 16 11:21:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
henrich pushed a commit to branch debian/sid
in repository jruby-joni.
commit 14af3b1cc09a3f00e97d8f06cee269b494c882fb
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date: Mon Feb 13 02:56:32 2012 +0100
Turn off failing tests for non unicode character class mode for \s \d \w
---
src/org/joni/Parser.java | 42 ++++++-------
src/org/joni/ast/QuantifierNode.java | 102 +++++++++++++++----------------
test/org/joni/test/Test.java | 74 +++++++++++------------
test/org/joni/test/TestC.java | 54 ++++++++---------
test/org/joni/test/TestU.java | 114 +++++++++++++++++------------------
5 files changed, 193 insertions(+), 193 deletions(-)
diff --git a/src/org/joni/Parser.java b/src/org/joni/Parser.java
index 71d29fd..ca34d5a 100644
--- a/src/org/joni/Parser.java
+++ b/src/org/joni/Parser.java
@@ -177,27 +177,27 @@ class Parser extends Lexer {
switch (token.type) {
case CHAR:
- int len;
-// if (Config.VANILLA) {
- len = enc.codeToMbcLength(token.getC());
- if (len > 1) {
- arg.inType = CCVALTYPE.CODE_POINT;
- } else {
- // !sb_char:!
- arg.inType = CCVALTYPE.SB;
- }
-// } else {
-// if (token.getCode() >= BitSet.SINGLE_BYTE_SIZE || (len = enc.codeToMbcLength(token.getC())) > 1) {
-// arg.inType = CCVALTYPE.CODE_POINT;
-// } else {
-// // !sb_char:!
-// arg.inType = CCVALTYPE.SB;
-// }
-// }
- arg.v = token.getC();
- arg.vIsRaw = false;
- // !goto val_entry2;!
- valEntry2(cc, arg);
+ final int len;
+ if (Config.VANILLA) {
+ len = enc.codeToMbcLength(token.getC());
+ if (len > 1) {
+ arg.inType = CCVALTYPE.CODE_POINT;
+ } else {
+ // !sb_char:!
+ arg.inType = CCVALTYPE.SB;
+ }
+ } else {
+ if (token.getCode() >= BitSet.SINGLE_BYTE_SIZE || (len = enc.codeToMbcLength(token.getC())) > 1) {
+ arg.inType = CCVALTYPE.CODE_POINT;
+ } else {
+ // !sb_char:!
+ arg.inType = CCVALTYPE.SB;
+ }
+ }
+ arg.v = token.getC();
+ arg.vIsRaw = false;
+ // !goto val_entry2;!
+ valEntry2(cc, arg);
break;
case RAW_BYTE:
diff --git a/src/org/joni/ast/QuantifierNode.java b/src/org/joni/ast/QuantifierNode.java
index 280f9bf..90fab29 100644
--- a/src/org/joni/ast/QuantifierNode.java
+++ b/src/org/joni/ast/QuantifierNode.java
@@ -1,20 +1,20 @@
/*
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.joni.ast;
@@ -30,52 +30,52 @@ public final class QuantifierNode extends StateNode {
public int lower;
public int upper;
public boolean greedy;
-
+
public int targetEmptyInfo;
-
+
public Node headExact;
public Node nextHeadExact;
public boolean isRefered; /* include called node. don't eliminate even if {0} */
-
+
// USE_COMBINATION_EXPLOSION_CHECK
- public int combExpCheckNum; /* 1,2,3...: check, 0: no check */
-
+ public int combExpCheckNum; /* 1,2,3...: check, 0: no check */
+
public QuantifierNode(int lower, int upper, boolean byNumber) {
this.lower = lower;
this.upper = upper;
greedy = true;
targetEmptyInfo = TargetInfo.ISNOT_EMPTY;
-
- if (byNumber) setByNumber();
+
+ if (byNumber) setByNumber();
}
@Override
public int getType() {
return QTFR;
}
-
+
@Override
protected void setChild(Node newChild) {
target = newChild;
}
-
+
@Override
protected Node getChild() {
return target;
}
-
+
public void setTarget(Node tgt) {
target = tgt;
- tgt.parent = this;
+ tgt.parent = this;
}
-
+
public StringNode convertToString() {
StringNode sn = new StringNode();
sn.flag = ((StringNode)target).flag;
sn.swap(this);
return sn;
}
-
+
@Override
public String getName() {
return "Quantifier";
@@ -93,14 +93,14 @@ public final class QuantifierNode extends StateNode {
value.append("\n nextHeadExact: " + pad(nextHeadExact, level + 1));
value.append("\n isRefered: " + isRefered);
value.append("\n combExpCheckNum: " + combExpCheckNum);
-
+
return value.toString();
}
-
+
public boolean isAnyCharStar() {
return greedy && isRepeatInfinite(upper) && target.getType() == CANY;
}
-
+
/* ?:0, *:1, +:2, ??:3, *?:4, +?:5 */
protected int popularNum() {
if (greedy) {
@@ -120,7 +120,7 @@ public final class QuantifierNode extends StateNode {
}
return -1;
}
-
+
protected void set(QuantifierNode other) {
setTarget(other.target);
other.target = null;
@@ -128,7 +128,7 @@ public final class QuantifierNode extends StateNode {
upper = other.upper;
greedy = other.greedy;
targetEmptyInfo = other.targetEmptyInfo;
-
+
//setHeadExact(other.headExact);
//setNextHeadExact(other.nextHeadExact);
headExact = other.headExact;
@@ -136,41 +136,41 @@ public final class QuantifierNode extends StateNode {
isRefered = other.isRefered;
combExpCheckNum = other.combExpCheckNum;
}
-
+
public void reduceNestedQuantifier(QuantifierNode other) {
int pnum = popularNum();
int cnum = other.popularNum();
-
+
if (pnum < 0 || cnum < 0) return;
-
+
switch(Reduce.REDUCE_TABLE[cnum][pnum]) {
case DEL:
- // no need to set the parent here...
+ // no need to set the parent here...
// swap ?
set(other); // *pnode = *cnode; ???
break;
-
+
case A:
setTarget(other.target);
lower = 0;
upper = REPEAT_INFINITE;
greedy = true;
break;
-
+
case AQ:
setTarget(other.target);
lower = 0;
upper = REPEAT_INFINITE;
greedy = false;
break;
-
+
case QQ:
setTarget(other.target);
lower = 0;
upper = 1;
greedy = false;
break;
-
+
case P_QQ:
setTarget(other);
lower = 0;
@@ -180,7 +180,7 @@ public final class QuantifierNode extends StateNode {
other.upper = REPEAT_INFINITE;
other.greedy = true;
return;
-
+
case PQ_Q:
setTarget(other);
lower = 0;
@@ -190,7 +190,7 @@ public final class QuantifierNode extends StateNode {
other.upper = REPEAT_INFINITE;
other.greedy = false;
return;
-
+
case ASIS:
setTarget(other);
return;
@@ -198,12 +198,12 @@ public final class QuantifierNode extends StateNode {
// ??? remove the parent from target ???
other.target = null; // remove target from reduced quantifier
}
-
+
public int setQuantifier(Node tgt, boolean group, ScanEnvironment env, byte[]bytes, int p, int end) {
if (lower == 1 && upper == 1) return 1;
-
+
switch(tgt.getType()) {
-
+
case STR:
if (!group) {
StringNode sn = (StringNode)tgt;
@@ -216,25 +216,25 @@ public final class QuantifierNode extends StateNode {
}
}
break;
-
+
case QTFR:
/* check redundant double repeat. */
/* verbose warn (?:.?)? etc... but not warn (.?)? etc... */
QuantifierNode qnt = (QuantifierNode)tgt;
int nestQNum = popularNum();
int targetQNum = qnt.popularNum();
-
+
if (Config.USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR) {
if (!isByNumber() && !qnt.isByNumber() && env.syntax.warnReduntantNestedRepeat()) {
switch(Reduce.REDUCE_TABLE[targetQNum][nestQNum]) {
case ASIS:
break;
-
+
case DEL:
- env.reg.warnings.warn(new String(bytes, p, end) +
+ env.reg.warnings.warn(new String(bytes, p, end) +
" redundant nested repeat operator");
break;
-
+
default:
env.reg.warnings.warn(new String(bytes, p, end) +
" nested repeat operator " + Reduce.PopularQStr[targetQNum] +
@@ -243,7 +243,7 @@ public final class QuantifierNode extends StateNode {
}
}
} // USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR
-
+
if (targetQNum >= 0) {
if (nestQNum >= 0) {
reduceNestedQuantifier(qnt);
@@ -255,11 +255,11 @@ public final class QuantifierNode extends StateNode {
}
}
}
-
+
default:
break;
}
-
+
setTarget(tgt);
return 0;
}
@@ -268,5 +268,5 @@ public final class QuantifierNode extends StateNode {
public static boolean isRepeatInfinite(int n) {
return n == REPEAT_INFINITE;
}
-
+
}
diff --git a/test/org/joni/test/Test.java b/test/org/joni/test/Test.java
index 1a9cec6..124504c 100644
--- a/test/org/joni/test/Test.java
+++ b/test/org/joni/test/Test.java
@@ -1,20 +1,20 @@
/*
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.joni.test;
@@ -35,27 +35,27 @@ public abstract class Test {
int nsucc;
int nerror;
int nfail;
-
+
public abstract int option();
public abstract Encoding encoding();
public abstract String testEncoding();
public abstract Syntax syntax();
-
+
protected String repr(byte[]bytes) {
return new String(bytes);
}
-
+
protected int length(byte[]bytes) {
return bytes.length;
}
-
+
public void xx(byte[]pattern, byte[]str, int from, int to, int mem, boolean not) {
xx(pattern, str, from, to, mem, not, option());
}
-
+
public void xx(byte[]pattern, byte[]str, int from, int to, int mem, boolean not, int option) {
Regex reg;
-
+
try {
reg = new Regex(pattern, 0, length(pattern), option, encoding(), syntax());
} catch (JOniException je) {
@@ -69,9 +69,9 @@ public abstract class Test {
e.printStackTrace(Config.err);
Config.err.println("SEVERE ERROR: " + e.getMessage());
nerror++;
- return;
+ return;
}
-
+
Matcher m = reg.matcher(str, 0, length(str));
Region region;
@@ -90,9 +90,9 @@ public abstract class Test {
e.printStackTrace(Config.err);
Config.err.println("SEVERE ERROR: " + e.getMessage());
nerror++;
- return;
+ return;
}
-
+
if (r == -1) {
if (not) {
Config.log.println("OK(N): /" + repr(pattern) + "/ '" + repr(str) + "'");
@@ -118,15 +118,15 @@ public abstract class Test {
}
}
}
-
+
protected void x2(byte[]pattern, byte[]str, int from, int to) {
xx(pattern, str, from, to, 0, false);
}
-
+
protected void x3(byte[]pattern, byte[]str, int from, int to, int mem) {
xx(pattern, str, from, to, mem, false);
}
-
+
protected void n(byte[]pattern, byte[]str) {
xx(pattern, str, 0, 0, 0, true);
}
@@ -134,7 +134,7 @@ public abstract class Test {
public void xxs(String pattern, String str, int from, int to, int mem, boolean not) {
xxs(pattern, str, from, to, mem, not, option());
}
-
+
public void xxs(String pattern, String str, int from, int to, int mem, boolean not, int option) {
try{
xx(pattern.getBytes(testEncoding()), str.getBytes(testEncoding()), from, to, mem, not, option);
@@ -146,7 +146,7 @@ public abstract class Test {
public void x2s(String pattern, String str, int from, int to) {
x2s(pattern, str, from, to, option());
}
-
+
public void x2s(String pattern, String str, int from, int to, int option) {
try{
xx(pattern.getBytes(testEncoding()), str.getBytes(testEncoding()), from, to, 0, false, option);
@@ -154,41 +154,41 @@ public abstract class Test {
uee.printStackTrace();
}
}
-
+
public void x3s(String pattern, String str, int from, int to, int mem) {
x3s(pattern, str, from, to, mem, option());
}
-
+
public void x3s(String pattern, String str, int from, int to, int mem, int option) {
- try{
+ try{
xx(pattern.getBytes(testEncoding()), str.getBytes(testEncoding()), from, to, mem, false, option);
} catch (UnsupportedEncodingException uee) {
uee.printStackTrace();
}
}
-
+
public void ns(String pattern, String str) {
ns(pattern, str, option());
}
-
+
public void ns(String pattern, String str, int option) {
- try{
+ try{
xx(pattern.getBytes(testEncoding()), str.getBytes(testEncoding()), 0, 0, 0, true, option);
} catch (UnsupportedEncodingException uee) {
uee.printStackTrace();
}
}
-
+
public void printResults() {
Config.log.println("\nRESULT SUCC: " + nsucc + ", FAIL: " + nfail + ", ERROR: " + nerror +
- " (by JONI)");
+ " (by JONI) " + "Encoding: " + encoding() + " Test: " + getClass().getSimpleName());
}
-
+
public abstract void test();
-
+
public final void run() {
test();
printResults();
}
-
+
}
diff --git a/test/org/joni/test/TestC.java b/test/org/joni/test/TestC.java
index 94f4218..9af3941 100644
--- a/test/org/joni/test/TestC.java
+++ b/test/org/joni/test/TestC.java
@@ -1,20 +1,20 @@
/*
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.joni.test;
@@ -34,14 +34,14 @@ public class TestC extends Test {
public Encoding encoding() {
return EUCJPEncoding.INSTANCE;
}
-
+
public String testEncoding() {
return "cp1250";
}
public Syntax syntax() {
return Syntax.DEFAULT;
- }
+ }
public void test() {
x2s("", "", 0, 0);
@@ -465,9 +465,9 @@ public class TestC extends Test {
if (Config.VANILLA) x2s("\\xca\\xb8", "\u0118\u00b8", 0, 2);
x2s(".", "\u00a4\u02d8", 0, 2);
x2s("..", "\u00a4\u00ab\u00a4\u00ad", 0, 4);
- x2s("\\w", "\u00a4\u015e", 0, 2);
- ns("\\W", "\u00a4\u02d8");
- x2s("[\\W]", "\u00a4\u00a6$", 2, 3);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\\w", "\u00a4\u015e", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) ns("\\W", "\u00a4\u02d8");
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("[\\W]", "\u00a4\u00a6$", 2, 3);
x2s("\\S", "\u00a4\u02dd", 0, 2);
x2s("\\S", "\u00b4\u00c1", 0, 2);
x2s("\\b", "\u00b5\u00a4 ", 0, 0);
@@ -479,27 +479,27 @@ public class TestC extends Test {
ns("[\u00a4\u0118\u00a4\u00cb]", "\u00a4\u011a");
x2s("[\u00a4\u00a6-\u00a4\u015e]", "\u00a4\u00a8", 0, 2);
ns("[^\u00a4\u00b1]", "\u00a4\u00b1");
- x2s("[\\w]", "\u00a4\u00cd", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("[\\w]", "\u00a4\u00cd", 0, 2);
ns("[\\d]", "\u00a4\u0150");
x2s("[\\D]", "\u00a4\u010e", 0, 2);
ns("[\\s]", "\u00a4\u017b");
x2s("[\\S]", "\u00a4\u0158", 0, 2);
- x2s("[\\w\\d]", "\u00a4\u010d", 0, 2);
- x2s("[\\w\\d]", " \u00a4\u010d", 3, 5);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("[\\w\\d]", "\u00a4\u010d", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("[\\w\\d]", " \u00a4\u010d", 3, 5);
ns("\\w\u00b5\u00b4\u013d\u00d6", " \u00b5\u00b4\u013d\u00d6");
x2s("\u00b5\u00b4\\W\u013d\u00d6", "\u00b5\u00b4 \u013d\u00d6", 0, 5);
x2s("\u00a4\u02d8.\u00a4\u00a4.\u00a4\u00a6", "\u00a4\u02d8\u00a4\u02d8\u00a4\u00a4\u00a4\u00a4\u00a4\u00a6", 0, 10);
- x2s(".\\w\u00a4\u00a6\\W..\u00a4\u013e", "\u00a4\u00a8\u00a4\u00a6\u00a4\u00a6 \u00a4\u00a6\u00a4\u013e\u00a4\u013e", 0, 13);
- x2s("\\s\\w\u00a4\u0142\u00a4\u0142\u00a4\u0142", " \u00a4\u0142\u00a4\u0142\u00a4\u0142\u00a4\u0142", 0, 9);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s(".\\w\u00a4\u00a6\\W..\u00a4\u013e", "\u00a4\u00a8\u00a4\u00a6\u00a4\u00a6 \u00a4\u00a6\u00a4\u013e\u00a4\u013e", 0, 13);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\\s\\w\u00a4\u0142\u00a4\u0142\u00a4\u0142", " \u00a4\u0142\u00a4\u0142\u00a4\u0142\u00a4\u0142", 0, 9);
x2s("\u00a4\u02d8\u00a4\u02d8.\u00a4\u00b1", "\u00a4\u02d8\u00a4\u02d8\u00a4\u00b1\u00a4\u00b1", 0, 8);
ns(".\u00a4\u00a4", "\u00a4\u00a4\u00a4\u00a8");
x2s(".\u00a4\u015e", "\u00a4\u015e\u00a4\u015e", 0, 4);
x2s("^\u00a4\u02d8", "\u00a4\u02d8", 0, 2);
x2s("^\u00a4\u0155$", "\u00a4\u0155", 0, 2);
- x2s("^\\w$", "\u00a4\u00cb", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("^\\w$", "\u00a4\u00cb", 0, 2);
x2s("^\\w\u00a4\u00ab\u00a4\u00ad\u00a4\u017b\u00a4\u00b1\u00a4\u0142$", "z\u00a4\u00ab\u00a4\u00ad\u00a4\u017b\u00a4\u00b1\u00a4\u0142", 0, 11);
x2s("^\\w...\u00a4\u00a6\u00a4\u00a8\u00a4\u015e$", "z\u00a4\u02d8\u00a4\u00a4\u00a4\u00a6\u00a4\u00a6\u00a4\u00a8\u00a4\u015e", 0, 13);
- x2s("\\w\\w\\s\\W\u00a4\u015e\u00a4\u015e\u00a4\u015e\\d", "a\u00a4\u015e \u00a4\u015e\u00a4\u015e\u00a4\u015e4", 0, 12);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\\w\\w\\s\\W\u00a4\u015e\u00a4\u015e\u00a4\u015e\\d", "a\u00a4\u015e \u00a4\u015e\u00a4\u015e\u00a4\u015e4", 0, 12);
x2s("\\A\u00a4\u017c\u00a4\u00c1\u00a4\u00c4", "\u00a4\u017c\u00a4\u00c1\u00a4\u00c4", 0, 6);
x2s("\u00a4\u0155\u00a4\u00e1\u00a4\u00e2\\Z", "\u00a4\u0155\u00a4\u00e1\u00a4\u00e2", 0, 6);
x2s("\u00a4\u00ab\u00a4\u00ad\u00a4\u017b\\z", "\u00a4\u00ab\u00a4\u00ad\u00a4\u017b", 0, 6);
@@ -555,9 +555,9 @@ public class TestC extends Test {
x2s("\u00b5\u00b4|\u013d\u00d6\\Z", "\u013d\u00d6\n", 0, 2);
x2s("\u00b5\u00b4|\u013d\u00d6\\z", "\u013d\u00d6\u00b5\u00b4", 2, 4);
x2s("\u00b5\u00b4|\u013d\u00d6\\z", "\u013d\u00d6", 0, 2);
- x2s("\\w|\\s", "\u00a4\u015e", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\\w|\\s", "\u00a4\u015e", 0, 2);
x2s("\\w|%", "%\u00a4\u015e", 0, 1);
- x2s("\\w|[&$]", "\u00a4\u00a6&", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\\w|[&$]", "\u00a4\u00a6&", 0, 2);
x2s("[\u00a4\u00a4-\u00a4\u00b1]", "\u00a4\u00a6", 0, 2);
x2s("[\u00a4\u00a4-\u00a4\u00b1]|[^\u00a4\u00ab-\u00a4\u0142]", "\u00a4\u02d8", 0, 2);
x2s("[\u00a4\u00a4-\u00a4\u00b1]|[^\u00a4\u00ab-\u00a4\u0142]", "\u00a4\u00ab", 0, 2);
@@ -688,7 +688,7 @@ public class TestC extends Test {
x3s("(((((((\u00a4\u00dd*)\u00a4\u00da))))))\u00a4\u00d4\\7", "\u00a4\u00dd\u00a4\u00dd\u00a4\u00dd\u00a4\u00da\u00a4\u00d4\u00a4\u00dd\u00a4\u00dd\u00a4\u00dd", 0, 6, 7);
x2s("(\u00a4\u010e)(\u00a4\u0147)(\u00a4\u0150)\\2\\1\\3", "\u00a4\u010e\u00a4\u0147\u00a4\u0150\u00a4\u0147\u00a4\u010e\u00a4\u0150", 0, 12);
x2s("([\u00a4\u00ad-\u00a4\u00b1])\\1", "\u00a4\u017b\u00a4\u017b", 0, 4);
- x2s("(\\w\\d\\s)\\1", "\u00a4\u02d85 \u00a4\u02d85 ", 0, 8);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("(\\w\\d\\s)\\1", "\u00a4\u02d85 \u00a4\u02d85 ", 0, 8);
ns("(\\w\\d\\s)\\1", "\u00a4\u02d85 \u00a4\u02d85");
x2s("(\u0102\u017b\u02c7\u00a9|[\u00a4\u02d8-\u00a4\u00a6]{3})\\1", "\u0102\u017b\u02c7\u00a9\u0102\u017b\u02c7\u00a9", 0, 8);
x2s("...(\u0102\u017b\u02c7\u00a9|[\u00a4\u02d8-\u00a4\u00a6]{3})\\1", "\u00a4\u02d8a\u00a4\u02d8\u0102\u017b\u02c7\u00a9\u0102\u017b\u02c7\u00a9", 0, 13);
@@ -729,7 +729,7 @@ public class TestC extends Test {
x2s("a<b>\u0104\u0110\u02c7\u013d\u0104\u00b8\u0104\u00e7\u0104\u00f3\u00a4\u00ce\u0104\u0154\u0104\u00a6\u0104\u00f3\u0104\u00ed\u02c7\u013d\u0104\u00c9<\\/b>", "a<b>\u0104\u0110\u02c7\u013d\u0104\u00b8\u0104\u00e7\u0104\u00f3\u00a4\u00ce\u0104\u0154\u0104\u00a6\u0104\u00f3\u0104\u00ed\u02c7\u013d\u0104\u00c9</b>", 0, 32);
x2s(".<b>\u0104\u0110\u02c7\u013d\u0104\u00b8\u0104\u00e7\u0104\u00f3\u00a4\u00ce\u0104\u0154\u0104\u00a6\u0104\u00f3\u0104\u00ed\u02c7\u013d\u0104\u00c9<\\/b>", "a<b>\u0104\u0110\u02c7\u013d\u0104\u00b8\u0104\u00e7\u0104\u00f3\u00a4\u00ce\u0104\u0154\u0104\u00a6\u0104\u00f3\u0104\u00ed\u02c7\u013d\u0104\u00c9</b>", 0, 32);
}
-
+
public static void main(String[] args) throws Throwable{
new TestC().run();
}
diff --git a/test/org/joni/test/TestU.java b/test/org/joni/test/TestU.java
index ee12227..eb4a2a7 100644
--- a/test/org/joni/test/TestU.java
+++ b/test/org/joni/test/TestU.java
@@ -1,20 +1,20 @@
/*
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.joni.test;
@@ -29,23 +29,23 @@ public class TestU extends Test {
public int option() {
return Option.DEFAULT;
}
-
+
public Encoding encoding() {
return UTF16BEEncoding.INSTANCE;
}
-
+
public String testEncoding() {
return "iso-8859-1";
}
-
+
public Syntax syntax() {
return Syntax.DEFAULT;
}
-
+
private int ulen(byte[]bytes) {
return encoding().strByteLengthNull(bytes, 0, bytes.length);
}
-
+
private String uconv(byte []bytes, int len) {
StringBuilder sb = new StringBuilder();
@@ -61,22 +61,22 @@ public class TestU extends Test {
}
} else {
sb.append(String.format("\\%03o", c));
- c = bytes[i+1] & 0xff;
+ c = bytes[i+1] & 0xff;
sb.append(String.format("\\%03o", c));
}
}
-
+
return sb.toString();
}
-
+
protected String repr(byte[]bytes) {
return uconv(bytes, ulen(bytes));
}
-
+
protected int length(byte[]bytes) {
return ulen(bytes);
}
-
+
public void test() {
x2s("\000\000", "\000\000", 0, 0);
x2s("\000^\000\000", "\000\000", 0, 0);
@@ -107,12 +107,12 @@ public class TestU extends Test {
x2s("\000.\000\000", "\000a\000\000", 0, 2);
ns("\000.\000\000", "\000\000");
x2s("\000.\000.\000\000", "\000a\000b\000\000", 0, 4);
- x2s("\000\134\000w\000\000", "\000e\000\000", 0, 2);
- ns("\000\134\000W\000\000", "\000e\000\000");
- x2s("\000\134\000s\000\000", "\000 \000\000", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000\134\000w\000\000", "\000e\000\000", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) ns("\000\134\000W\000\000", "\000e\000\000");
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000\134\000s\000\000", "\000 \000\000", 0, 2);
x2s("\000\134\000S\000\000", "\000b\000\000", 0, 2);
- x2s("\000\134\000d\000\000", "\0004\000\000", 0, 2);
- ns("\000\134\000D\000\000", "\0004\000\000");
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000\134\000d\000\000", "\0004\000\000", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) ns("\000\134\000D\000\000", "\0004\000\000");
x2s("\000\134\000b\000\000", "\000z\000 \000\000", 0, 0);
x2s("\000\134\000b\000\000", "\000 \000z\000\000", 2, 2);
x2s("\000\134\000B\000\000", "\000z\000z\000 \000\000", 2, 2);
@@ -128,18 +128,18 @@ public class TestU extends Test {
x2s("\000[\000\134\000^\000]\000+\000\000", "\0000\000^\000^\0001\000\000", 2, 6);
x2s("\000[\000b\000-\000]\000\000", "\000b\000\000", 0, 2);
x2s("\000[\000b\000-\000]\000\000", "\000-\000\000", 0, 2);
- x2s("\000[\000\134\000w\000]\000\000", "\000z\000\000", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000[\000\134\000w\000]\000\000", "\000z\000\000", 0, 2);
ns("\000[\000\134\000w\000]\000\000", "\000 \000\000");
- x2s("\000[\000\134\000W\000]\000\000", "\000b\000$\000\000", 2, 4);
- x2s("\000[\000\134\000d\000]\000\000", "\0005\000\000", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000[\000\134\000W\000]\000\000", "\000b\000$\000\000", 2, 4);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000[\000\134\000d\000]\000\000", "\0005\000\000", 0, 2);
ns("\000[\000\134\000d\000]\000\000", "\000e\000\000");
x2s("\000[\000\134\000D\000]\000\000", "\000t\000\000", 0, 2);
- ns("\000[\000\134\000D\000]\000\000", "\0003\000\000");
- x2s("\000[\000\134\000s\000]\000\000", "\000 \000\000", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) ns("\000[\000\134\000D\000]\000\000", "\0003\000\000");
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000[\000\134\000s\000]\000\000", "\000 \000\000", 0, 2);
ns("\000[\000\134\000s\000]\000\000", "\000a\000\000");
x2s("\000[\000\134\000S\000]\000\000", "\000b\000\000", 0, 2);
- ns("\000[\000\134\000S\000]\000\000", "\000 \000\000");
- x2s("\000[\000\134\000w\000\134\000d\000]\000\000", "\0002\000\000", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) ns("\000[\000\134\000S\000]\000\000", "\000 \000\000");
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000[\000\134\000w\000\134\000d\000]\000\000", "\0002\000\000", 0, 2);
ns("\000[\000\134\000w\000\134\000d\000]\000\000", "\000 \000\000");
x2s("\000[\000[\000:\000u\000p\000p\000e\000r\000:\000]\000]\000\000", "\000B\000\000", 0, 2);
x2s("\000[\000*\000[\000:\000x\000d\000i\000g\000i\000t\000:\000]\000+\000]\000\000", "\000+\000\000", 0, 2);
@@ -176,19 +176,19 @@ public class TestU extends Test {
ns("\000\134\000w\000a\000b\000c\000\000", "\000 \000a\000b\000c\000\000");
x2s("\000a\000\134\000W\000b\000c\000\000", "\000a\000 \000b\000c\000\000", 0, 8);
x2s("\000a\000.\000b\000.\000c\000\000", "\000a\000a\000b\000b\000c\000\000", 0, 10);
- x2s("\000.\000\134\000w\000b\000\134\000W\000.\000.\000c\000\000", "\000a\000b\000b\000 \000b\000c\000c\000\000", 0, 14);
- x2s("\000\134\000s\000\134\000w\000z\000z\000z\000\000", "\000 \000z\000z\000z\000z\000\000", 0, 10);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000.\000\134\000w\000b\000\134\000W\000.\000.\000c\000\000", "\000a\000b\000b\000 \000b\000c\000c\000\000", 0, 14);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000\134\000s\000\134\000w\000z\000z\000z\000\000", "\000 \000z\000z\000z\000z\000\000", 0, 10);
x2s("\000a\000a\000.\000b\000\000", "\000a\000a\000b\000b\000\000", 0, 8);
ns("\000.\000a\000\000", "\000a\000b\000\000");
x2s("\000.\000a\000\000", "\000a\000a\000\000", 0, 4);
x2s("\000^\000a\000\000", "\000a\000\000", 0, 2);
x2s("\000^\000a\000$\000\000", "\000a\000\000", 0, 2);
- x2s("\000^\000\134\000w\000$\000\000", "\000a\000\000", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000^\000\134\000w\000$\000\000", "\000a\000\000", 0, 2);
ns("\000^\000\134\000w\000$\000\000", "\000 \000\000");
- x2s("\000^\000\134\000w\000a\000b\000$\000\000", "\000z\000a\000b\000\000", 0, 6);
- x2s("\000^\000\134\000w\000a\000b\000c\000d\000e\000f\000$\000\000", "\000z\000a\000b\000c\000d\000e\000f\000\000", 0, 14);
- x2s("\000^\000\134\000w\000.\000.\000.\000d\000e\000f\000$\000\000", "\000z\000a\000b\000c\000d\000e\000f\000\000", 0, 14);
- x2s("\000\134\000w\000\134\000w\000\134\000s\000\134\000W\000a\000a\000a\000\134\000d\000\000", "\000a\000a\000 \000 \000a\000a\000a\0004\000\000", 0, 16);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000^\000\134\000w\000a\000b\000$\000\000", "\000z\000a\000b\000\000", 0, 6);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000^\000\134\000w\000a\000b\000c\000d\000e\000f\000$\000\000", "\000z\000a\000b\000c\000d\000e\000f\000\000", 0, 14);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000^\000\134\000w\000.\000.\000.\000d\000e\000f\000$\000\000", "\000z\000a\000b\000c\000d\000e\000f\000\000", 0, 14);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000\134\000w\000\134\000w\000\134\000s\000\134\000W\000a\000a\000a\000\134\000d\000\000", "\000a\000a\000 \000 \000a\000a\000a\0004\000\000", 0, 16);
x2s("\000\134\000A\000\134\000Z\000\000", "\000\000", 0, 0);
x2s("\000\134\000A\000x\000y\000z\000\000", "\000x\000y\000z\000\000", 0, 6);
x2s("\000x\000y\000z\000\134\000Z\000\000", "\000x\000y\000z\000\000", 0, 6);
@@ -202,8 +202,8 @@ public class TestU extends Test {
x2s("\000\134\000^\000\134\000$\000\000", "\000^\000$\000\000", 0, 4);
x2s("\000^\000x\000?\000y\000\000", "\000x\000y\000\000", 0, 4);
x2s("\000^\000(\000x\000?\000y\000)\000\000", "\000x\000y\000\000", 0, 4);
- x2s("\000\134\000w\000\000", "\000_\000\000", 0, 2);
- ns("\000\134\000W\000\000", "\000_\000\000");
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000\134\000w\000\000", "\000_\000\000", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) ns("\000\134\000W\000\000", "\000_\000\000");
x2s("\000(\000?\000=\000z\000)\000z\000\000", "\000z\000\000", 0, 2);
ns("\000(\000?\000=\000z\000)\000.\000\000", "\000a\000\000");
x2s("\000(\000?\000!\000z\000)\000a\000\000", "\000a\000\000", 0, 2);
@@ -278,7 +278,7 @@ public class TestU extends Test {
x2s("\000a\000|\000b\000\134\000Z\000\000", "\000b\000\000", 0, 2);
x2s("\000a\000|\000b\000\134\000z\000\000", "\000b\000a\000\000", 2, 4);
x2s("\000a\000|\000b\000\134\000z\000\000", "\000b\000\000", 0, 2);
- x2s("\000\134\000w\000|\000\134\000s\000\000", "\000 \000\000", 0, 2);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000\134\000w\000|\000\134\000s\000\000", "\000 \000\000", 0, 2);
ns("\000\134\000w\000|\000\134\000w\000\000", "\000 \000\000");
x2s("\000\134\000w\000|\000%\000\000", "\000%\000\000", 0, 2);
x2s("\000\134\000w\000|\000[\000&\000$\000]\000\000", "\000&\000\000", 0, 2);
@@ -360,7 +360,7 @@ public class TestU extends Test {
x2s("\000(\000?\000:\000X\000*\000)\000(\000?\000i\000:\000x\000a\000)\000\000", "\000X\000X\000X\000a\000\000", 0, 8);
x2s("\000(\000d\000+\000)\000(\000[\000^\000a\000b\000c\000]\000z\000)\000\000", "\000d\000d\000d\000z\000\000", 0, 8);
x2s("\000(\000[\000^\000a\000b\000c\000]\000*\000)\000(\000[\000^\000a\000b\000c\000]\000z\000)\000\000", "\000d\000d\000d\000z\000\000", 0, 8);
- x2s("\000(\000\134\000w\000+\000)\000(\000\134\000w\000z\000)\000\000", "\000d\000d\000d\000z\000\000", 0, 8);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000(\000\134\000w\000+\000)\000(\000\134\000w\000z\000)\000\000", "\000d\000d\000d\000z\000\000", 0, 8);
x3s("\000(\000a\000)\000\000", "\000a\000\000", 0, 2, 1);
x3s("\000(\000a\000b\000)\000\000", "\000a\000b\000\000", 0, 4, 1);
x2s("\000(\000(\000a\000b\000)\000)\000\000", "\000a\000b\000\000", 0, 4);
@@ -423,7 +423,7 @@ public class TestU extends Test {
x3s("\000(\000(\000(\000(\000(\000(\000(\000a\000*\000)\000b\000)\000)\000)\000)\000)\000)\000c\000\134\0007\000\000", "\000a\000a\000a\000b\000c\000a\000a\000a\000\000", 0, 6, 7);
x2s("\000(\000a\000)\000(\000b\000)\000(\000c\000)\000\134\0002\000\134\0001\000\134\0003\000\000", "\000a\000b\000c\000b\000a\000c\000\000", 0, 12);
x2s("\000(\000[\000a\000-\000d\000]\000)\000\134\0001\000\000", "\000c\000c\000\000", 0, 4);
- x2s("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "\000f\0005\000 \000f\0005\000 \000\000", 0, 12);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "\000f\0005\000 \000f\0005\000 \000\000", 0, 12);
ns("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "\000f\0005\000 \000f\0005\000\000");
x2s("\000(\000w\000h\000o\000|\000[\000a\000-\000c\000]\000{\0003\000}\000)\000\134\0001\000\000", "\000w\000h\000o\000w\000h\000o\000\000", 0, 12);
x2s("\000.\000.\000.\000(\000w\000h\000o\000|\000[\000a\000-\000c\000]\000{\0003\000}\000)\000\134\0001\000\000", "\000a\000b\000c\000w\000h\000o\000w\000h\000o\000\000", 0, 18);
@@ -435,7 +435,7 @@ public class TestU extends Test {
x2s("\000(\000a\000*\000\134\000Z\000)\000\134\0001\000\000", "\000a\000\000", 2, 2);
x2s("\000.\000(\000a\000*\000\134\000Z\000)\000\134\0001\000\000", "\000b\000a\000\000", 2, 4);
x3s("\000(\000.\000(\000a\000b\000c\000)\000\134\0002\000)\000\000", "\000z\000a\000b\000c\000a\000b\000c\000\000", 0, 14, 1);
- x3s("\000(\000.\000(\000.\000.\000\134\000d\000.\000)\000\134\0002\000)\000\000", "\000z\0001\0002\0003\0004\0001\0002\0003\0004\000\000", 0, 18, 1);
+ if (!org.joni.Config.NON_UNICODE_SDW) x3s("\000(\000.\000(\000.\000.\000\134\000d\000.\000)\000\134\0002\000)\000\000", "\000z\0001\0002\0003\0004\0001\0002\0003\0004\000\000", 0, 18, 1);
x2s("\000(\000(\000?\000i\000:\000a\000z\000)\000)\000\134\0001\000\000", "\000A\000z\000A\000z\000\000", 0, 8);
ns("\000(\000(\000?\000i\000:\000a\000z\000)\000)\000\134\0001\000\000", "\000A\000z\000a\000z\000\000");
x2s("\000(\000?\000<\000=\000a\000)\000b\000\000", "\000a\000b\000\000", 2, 4);
@@ -459,10 +459,10 @@ public class TestU extends Test {
x2s("\000\134\000g\000<\000n\000>\000(\000a\000b\000c\000|\000d\000f\000(\000?\000<\000n\000>\000.\000Y\000Z\000)\000{\0002\000,\0008\000}\000)\000{\0000\000}\000\000", "\000X\000Y\000Z\000\000", 0, 6);
x2s("\000\134\000A\000(\000?\000<\000n\000>\000(\000a\000\134\000g\000<\000n\000>\000)\000|\000)\000\134\000z\000\000", "\000a\000a\000a\000a\000\000", 0, 8);
x2s("\000(\000?\000<\000n\000>\000|\000\134\000g\000<\000m\000>\000\134\000g\000<\000n\000>\000)\000\134\000z\000|\000\134\000z\000E\000N\000D\000 \000(\000?\000<\000m\000>\000a\000|\000(\000b\000)\000\134\000g\000<\000m\000>\000)\000\000", "\000b\000b\000b\000b\000a\000b\000b\000a\000\000", 0, 16);
- x2s("\000(\000?\000<\000n\000a\000m\000e\0001\0002\0004\0000\000>\000\134\000w\000+\000\134\000s\000x\000)\000a\000+\000\134\000k\000<\000n\000a\000m\000e\0001\0002\0004\0000\000>\000\000", "\000 \000 \000f\000g\000 \000x\000a\000a\000a\000a\000a\000a\000a\000a\000f\000g\000 \000x\000\000", 4, 36);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000(\000?\000<\000n\000a\000m\000e\0001\0002\0004\0000\000>\000\134\000w\000+\000\134\000s\000x\000)\000a\000+\000\134\000k\000<\000n\000a\000m\000e\0001\0002\0004\0000\000>\000\000", "\000 \000 \000f\000g\000 \000x\000a\000a\000a\000a\000a\000a\000a\000a\000f\000g\000 \000x\000\000", 4, 36);
x3s("\000(\000z\000)\000(\000)\000(\000)\000(\000?\000<\000_\0009\000>\000a\000)\000\134\000g\000<\000_\0009\000>\000\000", "\000z\000a\000a\000\000", 4, 6, 1);
x2s("\000(\000.\000)\000(\000(\000(\000?\000<\000_\000>\000a\000)\000)\000)\000\134\000k\000<\000_\000>\000\000", "\000z\000a\000a\000\000", 0, 6);
- x2s("\000(\000(\000?\000<\000n\000a\000m\000e\0001\000>\000\134\000d\000)\000|\000(\000?\000<\000n\000a\000m\000e\0002\000>\000\134\000w\000)\000)\000(\000\134\000k\000<\000n\000a\000m\000e\0001\000>\000|\000\134\000k\000<\000n\000a\000m\000e\0002\000>\000)\000\000", "\000f\000f\000\000", 0, 4);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000(\000(\000?\000<\000n\000a\000m\000e\0001\000>\000\134\000d\000)\000|\000(\000?\000<\000n\000a\000m\000e\0002\000>\000\134\000w\000)\000)\000(\000\134\000k\000<\000n\000a\000m\000e\0001\000>\000|\000\134\000k\000<\000n\000a\000m\000e\0002\000>\000)\000\000", "\000f\000f\000\000", 0, 4);
x2s("\000(\000?\000:\000(\000?\000<\000x\000>\000)\000|\000(\000?\000<\000x\000>\000e\000f\000g\000)\000)\000\134\000k\000<\000x\000>\000\000", "\000\000", 0, 0);
x2s("\000(\000?\000:\000(\000?\000<\000x\000>\000a\000b\000c\000)\000|\000(\000?\000<\000x\000>\000e\000f\000g\000)\000)\000\134\000k\000<\000x\000>\000\000", "\000a\000b\000c\000e\000f\000g\000e\000f\000g\000\000", 6, 18);
ns("\000(\000?\000:\000(\000?\000<\000x\000>\000a\000b\000c\000)\000|\000(\000?\000<\000x\000>\000e\000f\000g\000)\000)\000\134\000k\000<\000x\000>\000\000", "\000a\000b\000c\000e\000f\000g\000\000");
@@ -501,7 +501,7 @@ public class TestU extends Test {
x2s("\000.\000.\000\000", "0K0M\000\000", 0, 4);
x2s("\000\134\000w\000\000", "0J\000\000", 0, 2);
ns("\000\134\000W\000\000", "0B\000\000");
- x2s("\000[\000\134\000W\000]\000\000", "0F\000$\000\000", 2, 4);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000[\000\134\000W\000]\000\000", "0F\000$\000\000", 2, 4);
x2s("\000\134\000S\000\000", "0]\000\000", 0, 2);
x2s("\000\134\000S\000\000", "o\042\000\000", 0, 2);
x2s("\000\134\000b\000\000", "l\027\000 \000\000", 0, 0);
@@ -514,7 +514,7 @@ public class TestU extends Test {
x2s("\000[0F\000-0J\000]\000\000", "0H\000\000", 0, 2);
ns("\000[\000^0Q\000]\000\000", "0Q\000\000");
x2s("\000[\000\134\000w\000]\000\000", "0m\000\000", 0, 2);
- ns("\000[\000\134\000d\000]\000\000", "0u\000\000");
+ if (!org.joni.Config.NON_UNICODE_SDW) ns("\000[\000\134\000d\000]\000\000", "0u\000\000");
x2s("\000[\000\134\000D\000]\000\000", "0o\000\000", 0, 2);
ns("\000[\000\134\000s\000]\000\000", "0O\000\000");
x2s("\000[\000\134\000S\000]\000\000", "0x\000\000", 0, 2);
@@ -524,16 +524,16 @@ public class TestU extends Test {
x2s("\233<\000\134\000W\216\312\000\000", "\233<\000 \216\312\000\000", 0, 6);
x2s("0B\000.0D\000.0F\000\000", "0B0B0D0D0F\000\000", 0, 10);
x2s("\000.\000\134\000w0F\000\134\000W\000.\000.0^\000\000", "0H0F0F\000 0F0^0^\000\000", 0, 14);
- x2s("\000\134\000s\000\134\000w0S0S0S\000\000", "\000 0S0S0S0S\000\000", 0, 10);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000\134\000s\000\134\000w0S0S0S\000\000", "\000 0S0S0S0S\000\000", 0, 10);
x2s("0B0B\000.0Q\000\000", "0B0B0Q0Q\000\000", 0, 8);
ns("\000.0D\000\000", "0D0H\000\000");
x2s("\000.0J\000\000", "0J0J\000\000", 0, 4);
x2s("\000^0B\000\000", "0B\000\000", 0, 2);
x2s("\000^0\200\000$\000\000", "0\200\000\000", 0, 2);
x2s("\000^\000\134\000w\000$\000\000", "0k\000\000", 0, 2);
- x2s("\000^\000\134\000w0K0M0O0Q0S\000$\000\000", "\000z0K0M0O0Q0S\000\000", 0, 12);
- x2s("\000^\000\134\000w\000.\000.\000.0F0H0J\000$\000\000", "\000z0B0D0F0F0H0J\000\000", 0, 14);
- x2s("\000\134\000w\000\134\000w\000\134\000s\000\134\000W0J0J0J\000\134\000d\000\000", "\000a0J\000 \000 0J0J0J\0004\000\000", 0, 16);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000^\000\134\000w0K0M0O0Q0S\000$\000\000", "\000z0K0M0O0Q0S\000\000", 0, 12);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000^\000\134\000w\000.\000.\000.0F0H0J\000$\000\000", "\000z0B0D0F0F0H0J\000\000", 0, 14);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000\134\000w\000\134\000w\000\134\000s\000\134\000W0J0J0J\000\134\000d\000\000", "\000a0J\000 \000 0J0J0J\0004\000\000", 0, 16);
x2s("\000\134\000A0_0a0d\000\000", "0_0a0d\000\000", 0, 6);
x2s("0\2000\2010\202\000\134\000Z\000\000", "0\2000\2010\202\000\000", 0, 6);
x2s("0K0M0O\000\134\000z\000\000", "0K0M0O\000\000", 0, 6);
@@ -722,7 +722,7 @@ public class TestU extends Test {
x3s("\000(\000(\000(\000(\000(\000(\000(0}\000*\000)0z\000)\000)\000)\000)\000)\000)0t\000\134\0007\000\000", "0}0}0}0z0t0}0}0}\000\000", 0, 6, 7);
x2s("\000(0o\000)\000(0r\000)\000(0u\000)\000\134\0002\000\134\0001\000\134\0003\000\000", "0o0r0u0r0o0u\000\000", 0, 12);
x2s("\000(\000[0M\000-0Q\000]\000)\000\134\0001\000\000", "0O0O\000\000", 0, 4);
- x2s("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "0B\0005\000 0B\0005\000 \000\000", 0, 12);
+ if (!org.joni.Config.NON_UNICODE_SDW) x2s("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "0B\0005\000 0B\0005\000 \000\000", 0, 12);
ns("\000(\000\134\000w\000\134\000d\000\134\000s\000)\000\134\0001\000\000", "0B\0005\000 0B\0005\000\000");
x2s("\000(\212\260\377\037\000|\000[0B\000-0F\000]\000{\0003\000}\000)\000\134\0001\000\000", "\212\260\377\037\212\260\377\037\000\000", 0, 8);
x2s("\000.\000.\000.\000(\212\260\377\037\000|\000[0B\000-0F\000]\000{\0003\000}\000)\000\134\0001\000\000", "0B\000a0B\212\260\377\037\212\260\377\037\000\000", 0, 14);
@@ -734,7 +734,7 @@ public class TestU extends Test {
x2s("\000(0B\000*\000\134\000Z\000)\000\134\0001\000\000", "0B\000\000", 2, 2);
x2s("\000.\000(0B\000*\000\134\000Z\000)\000\134\0001\000\000", "0D0B\000\000", 2, 4);
x3s("\000(\000.\000(0\2040D0\206\000)\000\134\0002\000)\000\000", "\000z0\2040D0\2060\2040D0\206\000\000", 0, 14, 1);
- x3s("\000(\000.\000(\000.\000.\000\134\000d\000.\000)\000\134\0002\000)\000\000", "0B\0001\0002\0003\0004\0001\0002\0003\0004\000\000", 0, 18, 1);
+ if (!org.joni.Config.NON_UNICODE_SDW) x3s("\000(\000.\000(\000.\000.\000\134\000d\000.\000)\000\134\0002\000)\000\000", "0B\0001\0002\0003\0004\0001\0002\0003\0004\000\000", 0, 18, 1);
x2s("\000(\000(\000?\000i\000:0B\000v0Z\000)\000)\000\134\0001\000\000", "0B\000v0Z0B\000v0Z\000\000", 0, 12);
x2s("\000(\000?\000<a\0320K\000>Y\011\000|\000\134\000(\000\134\000g\000<a\0320K\000>\000\134\000)\000)\000\000", "\000(\000(\000(\000(\000(\000(Y\011\000)\000)\000)\000)\000)\000)\000\000", 0, 26);
x2s("\000\134\000A\000(\000?\000:\000\134\000g\000<\226?\000_\0001\000>\000|\000\134\000g\000<N\221\000_\0002\000>\000|\000\134\000z}BN\206\000 \000 \000(\000?\000<\226?\000_\0001\000>\211\263\000|\201\352\000\134\000g\000<N\221\000_\0002\000>\201\352\000)\000(\000?\000<N\221\000_\0002\000>W(\000|\203\351\205\251\000\134\000g\000<\226?\000_\0001\000>\203\351\205\251\000)\000)\000$\000\000", "\203\351\205\251\201\352\203\351\205\251\201\352W(\201\352\203\351\205\251\201\352\203\35 [...]
@@ -763,7 +763,7 @@ public class TestU extends Test {
x2s("\000a\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000\134\000/\000b\000>\000\000", "\000a\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000/\000b\000>\000\000", 0, 40);
x2s("\000.\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000\134\000/\000b\000>\000\000", "\000a\000<\000b\000>0\3200\3740\2700\3470\3630n0\3000\2460\3630\3550\3740\311\000<\000/\000b\000>\000\000", 0, 40);
}
-
+
public static void main(String[] args) throws Throwable {
new TestU().run();
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git
More information about the pkg-java-commits
mailing list