Skip to content

Commit

Permalink
retrieve std.xmir from FakeMaven
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemGet committed Jan 8, 2025
1 parent 4667511 commit 4f5a845
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions eo-maven-plugin/src/test/java/org/eolang/maven/UnphiMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,15 +324,18 @@ void usesCache(@Mktmp final Path temp) throws Exception {
Path.of("std.xmir")
).get()
).value();
new FakeMaven(temp)
.with("cache", cache.toFile())
.with("unphiInputDir", temp.resolve("target/eo/phi/").toFile())
.with("unphiOutputDir", temp.resolve("target/eo/1-parse").toFile())
.allTojosWithHash(() -> hash)
.execute(UnphiMojo.class);
MatcherAssert.assertThat(
"XMIR file is not loaded from cache",
new TextOf(Files.readString(temp.resolve("target/eo/1-parse/std.xmir"))),
new TextOf(
new FakeMaven(temp)
.with("cache", cache.toFile())
.with("unphiInputDir", temp.resolve("target/eo/phi/").toFile())
.with("unphiOutputDir", temp.resolve("target/eo/1-parse").toFile())
.allTojosWithHash(() -> hash)
.execute(UnphiMojo.class)
.result()
.get("target/eo/1-parse/std.xmir")
),
Matchers.equalTo(expected)
);
}
Expand Down

0 comments on commit 4f5a845

Please sign in to comment.