summaryrefslogtreecommitdiff
path: root/dev-java/stringtemplate/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-java/stringtemplate/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-java/stringtemplate/files')
-rw-r--r--dev-java/stringtemplate/files/3.2.1-test-fixes.patch53
-rw-r--r--dev-java/stringtemplate/files/4.0.8-test-fixes.patch38
2 files changed, 91 insertions, 0 deletions
diff --git a/dev-java/stringtemplate/files/3.2.1-test-fixes.patch b/dev-java/stringtemplate/files/3.2.1-test-fixes.patch
new file mode 100644
index 000000000000..fd625abd0668
--- /dev/null
+++ b/dev-java/stringtemplate/files/3.2.1-test-fixes.patch
@@ -0,0 +1,53 @@
+https://github.com/antlr/stringtemplate3/pull/3
+
+--- test/org/antlr/stringtemplate/test/TestStringTemplate.java.orig 2015-09-18 22:04:18.131902875 +0100
++++ test/org/antlr/stringtemplate/test/TestStringTemplate.java 2015-09-18 22:04:21.651848456 +0100
+@@ -36,6 +36,10 @@
+ import java.text.SimpleDateFormat;
+ import java.util.*;
+
++import org.junit.FixMethodOrder;
++import org.junit.runners.MethodSorters;
++
++@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+ public class TestStringTemplate extends TestCase {
+ static final String newline = System.getProperty("line.separator");
+
+@@ -87,7 +91,7 @@
+ assertEquals(expecting,I.toString());
+ }
+
+- public void testNoGroupLoader() throws Exception {
++ public void testAaaNoGroupLoader() throws Exception {
+ // this also tests the group loader
+ StringTemplateErrorListener errors = new ErrorBuffer();
+ String tmpdir = System.getProperty("java.io.tmpdir");
+@@ -2214,8 +2218,12 @@
+ s.add("2");
+ s.add("3");
+ st.setAttribute("items", s);
+- expecting = "<li>3</li><li>2</li><li>1</li>";
+- assertEquals(expecting, st.toString());
++ String[] split = st.toString().split("(</?li>){1,2}");
++ Arrays.sort(split);
++ assertEquals("", split[0]);
++ assertEquals("1", split[1]);
++ assertEquals("2", split[2]);
++ assertEquals("3", split[3]);
+ }
+
+ public void testDumpMapAndSet() throws Exception {
+@@ -2235,8 +2243,11 @@
+ s.add("2");
+ s.add("3");
+ st.setAttribute("items", s);
+- expecting = "3,2,1";
+- assertEquals(expecting, st.toString());
++ String[] split = st.toString().split(",");
++ Arrays.sort(split);
++ assertEquals("1", split[0]);
++ assertEquals("2", split[1]);
++ assertEquals("3", split[2]);
+ }
+
+ public class Connector3 {
diff --git a/dev-java/stringtemplate/files/4.0.8-test-fixes.patch b/dev-java/stringtemplate/files/4.0.8-test-fixes.patch
new file mode 100644
index 000000000000..9480abe3ed3f
--- /dev/null
+++ b/dev-java/stringtemplate/files/4.0.8-test-fixes.patch
@@ -0,0 +1,38 @@
+diff -Naur test.orig/org/stringtemplate/v4/test/TestGroups.java test/org/stringtemplate/v4/test/TestGroups.java
+--- test.orig/org/stringtemplate/v4/test/TestGroups.java 2014-03-25 11:55:55.000000000 +0000
++++ test/org/stringtemplate/v4/test/TestGroups.java 2015-09-13 11:01:07.999800299 +0100
+@@ -29,6 +29,7 @@
+
+ import org.junit.Assert;
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.stringtemplate.v4.ST;
+ import org.stringtemplate.v4.STErrorListener;
+ import org.stringtemplate.v4.STGroup;
+@@ -527,6 +528,7 @@
+ assertEquals(expected, result);
+ }
+
++ @Ignore
+ @Test public void testUnknownNamedArg() throws Exception {
+ String dir = getRandomDir();
+ String groupFile =
+diff -Naur test.orig/org/stringtemplate/v4/test/TestGroupSyntaxErrors.java test/org/stringtemplate/v4/test/TestGroupSyntaxErrors.java
+--- test.orig/org/stringtemplate/v4/test/TestGroupSyntaxErrors.java 2014-03-25 11:55:55.000000000 +0000
++++ test/org/stringtemplate/v4/test/TestGroupSyntaxErrors.java 2015-09-13 11:01:05.011850826 +0100
+@@ -28,6 +28,7 @@
+ package org.stringtemplate.v4.test;
+
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.stringtemplate.v4.STErrorListener;
+ import org.stringtemplate.v4.STGroup;
+ import org.stringtemplate.v4.STGroupFile;
+@@ -36,6 +37,7 @@
+ import static org.junit.Assert.assertEquals;
+
+ public class TestGroupSyntaxErrors extends BaseTest {
++ @Ignore
+ @Test public void testMissingImportString() throws Exception {
+ String templates =
+ "import\n" +