Skip to content

Commit

Permalink
add file compare to unit test refs Edirom/MEIGarage#13
Browse files Browse the repository at this point in the history
  • Loading branch information
anneferger committed Apr 10, 2024
1 parent fd183e8 commit 721d904
Show file tree
Hide file tree
Showing 3 changed files with 18,897 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
!*.xsd
!*.yml
!test-input.*.zip
!expected-output.rng
!required.sh
!*.gitkeep
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ public void customize() throws IOException, EGEException {
assertNotNull(new File("src/test/resources/test-output.rng"));
//System.out.println(new String(Files.readAllBytes(Paths.get("src/test/resources/test-output.odd")), "UTF-8"));
assertNotEquals("", new String(Files.readAllBytes(Paths.get("src/test/resources/test-output.rng")), "UTF-8"));
//Always differs:
// <!--
//Schema generated from ODD source 2024-04-10T09:12:30Z. .
//--><!---->
assertEquals("The files differ!",
new String(Files.readAllBytes(Paths.get("src/test/resources/test-output.rng"))).replaceAll("<!--[\\s\\S]*?-->",""),
new String(Files.readAllBytes(Paths.get("src/test/resources/expected-output.rng"))).replaceAll("<!--[\\s\\S]*?-->", ""));
os.close();
}

Expand Down
Loading

0 comments on commit 721d904

Please sign in to comment.