Skip to content

Commit

Permalink
#3684 use StrictXmir in plugin tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 17, 2024
1 parent aca8ac6 commit 0061545
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.eolang.jucs.ClasspathSource;
import org.eolang.maven.util.HmBase;
import org.eolang.parser.EoSyntax;
import org.eolang.parser.StrictXmir;
import org.eolang.xax.XtSticky;
import org.eolang.xax.XtYaml;
import org.eolang.xax.Xtory;
Expand Down Expand Up @@ -203,12 +204,14 @@ void checksUnphiPacks(final String pack, @Mktmp final Path temp) throws Exceptio
new HmBase(temp).save(phi, Paths.get("target/phi/main.phi"));
final List<String> failures = new ListOf<>();
new FakeMaven(temp).execute(UnphiMojo.class);
final XML doc = new XMLDocument(
new TextOf(
temp.resolve(
Paths.get(String.format("target/%s/main.xmir", ParseMojo.DIR))
)
).asString()
final XML doc = new StrictXmir(
new XMLDocument(
new TextOf(
temp.resolve(
Paths.get(String.format("target/%s/main.xmir", ParseMojo.DIR))
)
).asString()
)
);
Logger.debug(this, "Parsed phi:\n%s", doc);
for (final String xpath : (Iterable<String>) xtory.map().get("asserts")) {
Expand Down Expand Up @@ -239,7 +242,6 @@ void convertsToXmirAndBack(final String pack, @Mktmp final Path temp) throws Exc
final long saved = temp.resolve(path).toFile().lastModified();
final FakeMaven maven = new FakeMaven(temp).execute(UnphiMojo.class);
final Path xmir = temp.resolve(String.format("target/%s/main.xmir", ParseMojo.DIR));
Logger.debug(this, "Unphied XMIR: %s", new TextOf(xmir).asString());
maven.foreignTojos().add("name").withXmir(xmir);
final Path result = maven
.execute(OptimizeMojo.class)
Expand Down

0 comments on commit 0061545

Please sign in to comment.