diff options
| author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2025-07-26 17:12:45 +0200 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-10-03 06:08:41 +0100 |
| commit | ff3cc60d536457d31e672f28f5c0a6455ce6c2b0 (patch) | |
| tree | b24321ec8369cec851d7c9ba0c4011e3fb6f1327 /dev-java/commons-text/files/commons-text-1.14.0-ScriptStringLookupTest.patch | |
| parent | 2d8f2af34a445545092d7ae2f93f0aa2b5c5ab84 (diff) | |
| download | gentoo-ff3cc60d536457d31e672f28f5c0a6455ce6c2b0.tar.gz gentoo-ff3cc60d536457d31e672f28f5c0a6455ce6c2b0.tar.bz2 gentoo-ff3cc60d536457d31e672f28f5c0a6455ce6c2b0.zip | |
dev-java/commons-text: new package, add 1.14.0
test-dependency of dev-java/commons-lang
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Part-of: https://github.com/gentoo/gentoo/pull/42983
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-java/commons-text/files/commons-text-1.14.0-ScriptStringLookupTest.patch')
| -rw-r--r-- | dev-java/commons-text/files/commons-text-1.14.0-ScriptStringLookupTest.patch | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/dev-java/commons-text/files/commons-text-1.14.0-ScriptStringLookupTest.patch b/dev-java/commons-text/files/commons-text-1.14.0-ScriptStringLookupTest.patch new file mode 100644 index 000000000000..725503e07d62 --- /dev/null +++ b/dev-java/commons-text/files/commons-text-1.14.0-ScriptStringLookupTest.patch @@ -0,0 +1,86 @@ +─ testOne() + tags: [] + uniqueId: [engine:junit-jupiter]/[class:org.apache.commons.text.lookup.ScriptStringLookupTest]/[method:testOne()] + parent: [engine:junit-jupiter]/[class:org.apache.commons.text.lookup.ScriptStringLookupTest] + source: MethodSource [className = 'org.apache.commons.text.lookup.ScriptStringLookupTest', methodName = 'testOne', methodParameterTypes = ''] + caught: java.lang.IllegalArgumentException: Error in script engine [JavaScript] evaluating script ["Hello World!"]. + at org.apache.commons.text.lookup.IllegalArgumentExceptions.format(IllegalArgumentExceptions.java:49) + at org.apache.commons.text.lookup.ScriptStringLookup.lookup(ScriptStringLookup.java:88) + at org.apache.commons.text.lookup.StringLookup.apply(StringLookup.java:66) + at org.apache.commons.text.lookup.ScriptStringLookupTest.testOne(ScriptStringLookupTest.java:56) + at java.base/java.lang.reflect.Method.invoke(Method.java:565) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1604) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1604) + Caused by: java.lang.IllegalArgumentException: No script engine named JavaScript + at org.apache.commons.text.lookup.ScriptStringLookup.lookup(ScriptStringLookup.java:84) + ... 5 more + duration: 1 ms + status: ✘ FAILED +─ testScriptUsingMultipleColons() + tags: [] + uniqueId: [engine:junit-jupiter]/[class:org.apache.commons.text.lookup.ScriptStringLookupTest]/[method:testScriptUsingMultipleColons()] + parent: [engine:junit-jupiter]/[class:org.apache.commons.text.lookup.ScriptStringLookupTest] + source: MethodSource [className = 'org.apache.commons.text.lookup.ScriptStringLookupTest', methodName = 'testScriptUsingMultipleColons', methodParameterTypes = ''] + caught: java.lang.IllegalArgumentException: Error in script engine [JavaScript] evaluating script [true ? "It Works" : "It Does Not Work" ]. + at org.apache.commons.text.lookup.IllegalArgumentExceptions.format(IllegalArgumentExceptions.java:49) + at org.apache.commons.text.lookup.ScriptStringLookup.lookup(ScriptStringLookup.java:88) + at org.apache.commons.text.lookup.StringLookup.apply(StringLookup.java:66) + at org.apache.commons.text.lookup.ScriptStringLookupTest.testScriptUsingMultipleColons(ScriptStringLookupTest.java:72) + at java.base/java.lang.reflect.Method.invoke(Method.java:565) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1604) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1604) + Caused by: java.lang.IllegalArgumentException: No script engine named JavaScript + at org.apache.commons.text.lookup.ScriptStringLookup.lookup(ScriptStringLookup.java:84) + ... 5 more + duration: 1 ms + status: ✘ FAILED +─ testSanityCheck() + tags: [] + uniqueId: [engine:junit-jupiter]/[class:org.apache.commons.text.lookup.ScriptStringLookupTest]/[method:testSanityCheck()] + parent: [engine:junit-jupiter]/[class:org.apache.commons.text.lookup.ScriptStringLookupTest] + source: MethodSource [className = 'org.apache.commons.text.lookup.ScriptStringLookupTest', methodName = 'testSanityCheck', methodParameterTypes = ''] + caught: org.opentest4j.AssertionFailedError: JavaScript ==> expected: not <null> + at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152) + at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) + at org.junit.jupiter.api.AssertNotNull.failNull(AssertNotNull.java:49) + at org.junit.jupiter.api.AssertNotNull.assertNotNull(AssertNotNull.java:35) + at org.junit.jupiter.api.Assertions.assertNotNull(Assertions.java:312) + at org.apache.commons.text.lookup.ScriptStringLookupTest.testSanityCheck(ScriptStringLookupTest.java:61) + at java.base/java.lang.reflect.Method.invoke(Method.java:565) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1604) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1604) + duration: 1 ms + status: ✘ FAILED + +--- a/src/test/java/org/apache/commons/text/lookup/ScriptStringLookupTest.java ++++ b/src/test/java/org/apache/commons/text/lookup/ScriptStringLookupTest.java +@@ -22,6 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; + import javax.script.ScriptEngineManager; + + import org.junit.jupiter.api.Assertions; ++import org.junit.jupiter.api.Disabled; + import org.junit.jupiter.api.Test; + + /** +@@ -51,11 +52,13 @@ class ScriptStringLookupTest { + Assertions.assertNull(ScriptStringLookup.INSTANCE.apply(null)); + } + ++ @Disabled + @Test + void testOne() { + Assertions.assertEquals("Hello World!", ScriptStringLookup.INSTANCE.apply(JS_NAME + ":\"Hello World!\"")); + } + ++ @Disabled + @Test + void testSanityCheck() { + Assertions.assertNotNull(new ScriptEngineManager().getEngineByName(JS_NAME), JS_NAME); +@@ -66,6 +69,7 @@ class ScriptStringLookupTest { + assertThrows(IllegalArgumentException.class, () -> ScriptStringLookup.INSTANCE.apply("JavaScript=\"test\"")); + } + ++ @Disabled + @Test + void testScriptUsingMultipleColons() { + Assertions.assertEquals("It Works", |
