[jruby-joni] 88/279: regression test for JRUBY-6414

Hideki Yamane henrich at moszumanska.debian.org
Mon Nov 16 11:26:56 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 ffc4292d1677a24f12a0c3139d2c121961a797b1
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date:   Sun Feb 12 19:22:12 2012 +0100

    regression test for JRUBY-6414
---
 test/org/joni/test/TestJoni.java | 15 +++++++-----
 test/org/joni/test/TestU8.java   | 52 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 6 deletions(-)

diff --git a/test/org/joni/test/TestJoni.java b/test/org/joni/test/TestJoni.java
index 5d7c256..e4505f3 100644
--- a/test/org/joni/test/TestJoni.java
+++ b/test/org/joni/test/TestJoni.java
@@ -3,34 +3,36 @@ package org.joni.test;
 import junit.framework.TestCase;
 
 public class TestJoni extends TestCase {
-    
+
     private Test testa;
     private Test testc;
     private Test testu;
     private Test testnsu8;
     private Test testLookBehind;
-    
+    private Test testu8;
+
     protected void setUp() {
         testa = new TestA();
         testc = new TestC();
         testu = new TestU();
         testnsu8 = new TestNSU8();
+        testu8 = new TestU8();
         testLookBehind = new TestLookBehind();
     }
-    
+
     protected void tearDown() {
     }
-    
+
     private void testJoniTest(Test test) {
         test.run();
         assertEquals(test.nerror, 0);
         assertEquals(test.nfail, 0);
     }
-    
+
     public void testAscii() {
         testJoniTest(testa);
     }
-    
+
     public void testEUCJP() {
         testJoniTest(testc);
     }
@@ -38,6 +40,7 @@ public class TestJoni extends TestCase {
     public void testUnicode() {
         testJoniTest(testu);
         testJoniTest(testnsu8);
+        testJoniTest(testu8);
     }
 
     public void testLookBehind() {
diff --git a/test/org/joni/test/TestU8.java b/test/org/joni/test/TestU8.java
new file mode 100644
index 0000000..b3d550c
--- /dev/null
+++ b/test/org/joni/test/TestU8.java
@@ -0,0 +1,52 @@
+/*
+ * 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
+ * SOFTWARE.
+ */
+package org.joni.test;
+
+import org.jcodings.Encoding;
+import org.jcodings.specific.UTF8Encoding;
+import org.joni.Option;
+import org.joni.Syntax;
+
+public class TestU8 extends Test {
+
+    public int option() {
+        return Option.DEFAULT;
+    }
+
+    public Encoding encoding() {
+        return UTF8Encoding.INSTANCE;
+    }
+
+    public String testEncoding() {
+        return "iso-8859-1";
+    }
+
+    public Syntax syntax() {
+        return Syntax.DEFAULT;
+    }
+
+    public void test() {
+        xx("^\\d\\d\\d-".getBytes(), new byte []{-30, -126, -84, 48, 45}, 0, 0, 0, true);
+    }
+
+    public static void main(String[] args) throws Throwable {
+        new TestU8().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