diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 545030703..0243370b8 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -3,16 +3,12 @@ name: Java CI with Maven -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] +on: push jobs: build: - runs-on: windows-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/pom.xml b/pom.xml index ac3683271..610466e5e 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.tzi.use use pom - 7.0.1 + 7.1.0 use-core use-gui diff --git a/use-assembly/pom.xml b/use-assembly/pom.xml index 2dbfbc98c..b5831501d 100644 --- a/use-assembly/pom.xml +++ b/use-assembly/pom.xml @@ -5,7 +5,7 @@ use org.tzi.use - 7.0.1 + 7.1.0 4.0.0 diff --git a/use-core/pom.xml b/use-core/pom.xml index 22e9a4010..2553c2159 100644 --- a/use-core/pom.xml +++ b/use-core/pom.xml @@ -5,7 +5,7 @@ use org.tzi.use - 7.0.1 + 7.1.0 4.0.0 diff --git a/use-core/src/main/java/org/tzi/use/config/Options.java b/use-core/src/main/java/org/tzi/use/config/Options.java index 0c2c0c3ea..696e84b18 100644 --- a/use-core/src/main/java/org/tzi/use/config/Options.java +++ b/use-core/src/main/java/org/tzi/use/config/Options.java @@ -46,7 +46,7 @@ public class Options { // the release version - public static final String RELEASE_VERSION = "7.0.1"; + public static final String RELEASE_VERSION = "7.1.0"; // the copyright public static final String COPYRIGHT = "Copyright (C) 1999-2021 University of Bremen"; diff --git a/use-gui/pom.xml b/use-gui/pom.xml index da4f10924..71680a2bd 100644 --- a/use-gui/pom.xml +++ b/use-gui/pom.xml @@ -5,7 +5,7 @@ use org.tzi.use - 7.0.1 + 7.1.0 4.0.0 diff --git a/use-gui/src/it/java/org/tzi/use/main/ShellIT.java b/use-gui/src/it/java/org/tzi/use/main/ShellIT.java index 945ff5252..2193e26ba 100644 --- a/use-gui/src/it/java/org/tzi/use/main/ShellIT.java +++ b/use-gui/src/it/java/org/tzi/use/main/ShellIT.java @@ -5,7 +5,6 @@ import com.github.difflib.patch.Patch; import org.junit.jupiter.api.DynamicTest; import org.junit.jupiter.api.TestFactory; -import org.tzi.use.config.Options; import java.io.*; import java.net.URISyntaxException; @@ -135,8 +134,15 @@ private void assertShellExpressions(Path testFile, Path useFile) { */ private void validateOutput(Path testFile, List expectedOutput, List actualOutput) { Patch patch = DiffUtils.diff(expectedOutput, actualOutput); + boolean nonWhitespaceChange = false; - if (!patch.getDeltas().isEmpty()) { + // Check if non whitespace diffs are present + nonWhitespaceChange = patch.getDeltas().stream().anyMatch( + (delta) -> delta.getSource().getLines().stream().anyMatch(line -> !line.isBlank()) || + delta.getTarget().getLines().stream().anyMatch(line -> !line.isBlank()) + ); + + if (nonWhitespaceChange) { StringBuilder diffMsg = new StringBuilder("USE output does not match expected output!").append(System.lineSeparator()); diffMsg.append("Testfile: ").append(testFile).append(System.lineSeparator()); @@ -146,7 +152,14 @@ private void validateOutput(Path testFile, List expectedOutput, List delta : patch.getDeltas()) { - diffMsg.append(delta.toString()).append(System.lineSeparator()); + diffMsg.append("Diff [") + .append(delta.getType()) + .append("] Source: '") + .append(delta.getSource().toString()) + .append("' Target: '" ) + .append(delta.getTarget().toString()) + .append("'") + .append(System.lineSeparator()); } writeToFile(expectedOutput, testFile.getParent().resolve(testFile.getFileName().toString() + ".expected" )); @@ -210,7 +223,7 @@ private List createCommandFile(Path inFile, Path cmdFile) { try { cmdWriter.write(inputLine); - cmdWriter.write(Options.LINE_SEPARATOR); + cmdWriter.write(System.lineSeparator()); expectedOutput.add((prompt + inputLine).trim()); } catch (IOException e1) { @@ -319,7 +332,9 @@ private List runUSE(Path useFile, Path cmdFile) { if (proc.isAlive()) { line = line == null ? "" : line.trim(); - actualOutput.add(line); + if (!line.equals("")) { + actualOutput.add(line); + } } }