diff options
| author | Miroslav Šulc <fordfrog@gentoo.org> | 2023-12-01 11:02:17 +0100 |
|---|---|---|
| committer | Miroslav Šulc <fordfrog@gentoo.org> | 2023-12-01 11:02:29 +0100 |
| commit | eabdf0892f779c6f232d4ad6b40bb846072ab5c1 (patch) | |
| tree | 91c13379323c505d7a82af03e7dfd3091464e9ab /dev-java/felix-gogo-runtime/files/felix-gogo-runtime-1.1.6-skip-tests-non-java-8.patch | |
| parent | 60cdbd11894c3b59c032a86ece611439b7331baf (diff) | |
| download | gentoo-eabdf0892f779c6f232d4ad6b40bb846072ab5c1.tar.gz gentoo-eabdf0892f779c6f232d4ad6b40bb846072ab5c1.tar.bz2 gentoo-eabdf0892f779c6f232d4ad6b40bb846072ab5c1.zip | |
dev-java/felix-gogo-runtime: enabled tests for all java versions
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/felix-gogo-runtime/files/felix-gogo-runtime-1.1.6-skip-tests-non-java-8.patch')
| -rw-r--r-- | dev-java/felix-gogo-runtime/files/felix-gogo-runtime-1.1.6-skip-tests-non-java-8.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dev-java/felix-gogo-runtime/files/felix-gogo-runtime-1.1.6-skip-tests-non-java-8.patch b/dev-java/felix-gogo-runtime/files/felix-gogo-runtime-1.1.6-skip-tests-non-java-8.patch new file mode 100644 index 000000000000..270b01be759a --- /dev/null +++ b/dev-java/felix-gogo-runtime/files/felix-gogo-runtime-1.1.6-skip-tests-non-java-8.patch @@ -0,0 +1,22 @@ +skip tests that fail with java > 1.8 if java > 1.8 is used + +we compare here just that the first part of the version is 1 +which is true only for version 1.8, other versions have first number +like 11, 17, 21 and those fail the condition hence the remaining tests +are skipped +we cannot use System.version() here as this is available only since java 9 + +--- a/src/test/java/org/apache/felix/gogo/runtime/TestParser.java ++++ b/src/test/java/org/apache/felix/gogo/runtime/TestParser.java +@@ -149,9 +149,10 @@ public class TestParser extends AbstractParserTest + assertEquals("def", c.execute("echo def|grep d.*|capture")); + assertEquals("def", c.execute("echoout def|grep d.*|capture")); + assertEquals("def", c.execute("myecho def|grep d.*|capture")); +- assertEquals("def", c.execute("(echoout abc; echoout def; echoout ghi)|grep d.*|capture")); + assertEquals("", c.execute("echoout def; echoout ghi | grep d.* | capture")); + assertEquals("hello world", c.execute("echo hello world|capture")); ++ org.junit.Assume.assumeTrue("1".equals(System.getProperty("java.version").split("\\.")[0])); ++ assertEquals("def", c.execute("(echoout abc; echoout def; echoout ghi)|grep d.*|capture")); + assertEquals("defghi", c.execute("(echoout abc; echoout def; echoout ghi)|grep 'def|ghi'|capture")); + } + |
