Skip to content

Commit

Permalink
feat(#432): prove that opeo keeps packages
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Aug 31, 2024
1 parent b8cc4ae commit 20ac878
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ void removesAllAliases() {
);
}

@Test
void keepsPackage() {
MatcherAssert.assertThat(
"We expect that package is kept, even if the program doesn't have labels or opcodes",
new WithoutAliases(WithoutAliasesTest.program()).toXml(),
XhtmlMatchers.hasXPath("/program/metas/meta[head='package']")
);
}

@Test
void removesOnlyLabelAlias() {
MatcherAssert.assertThat(
Expand Down Expand Up @@ -117,6 +126,14 @@ private static XML program(final Directives... objects) {
new Directives()
.add("program")
.add("metas")
.append(
new Directives()
.add("meta")
.add("head").set("package").up()
.add("tail").set("org.eolang.opeo").up()
.add("part").set("org.eolang.opeo").up()
.up()
)
.append(WithoutAliasesTest.alias("org.eolang.jeo.label"))
.append(WithoutAliasesTest.alias("org.eolang.jeo.opcode"))
.up()
Expand Down

0 comments on commit 20ac878

Please sign in to comment.