Skip to content

Commit

Permalink
Add test for format of numbering level without explicit format
Browse files Browse the repository at this point in the history
  • Loading branch information
mwilliamson committed Mar 20, 2024
1 parent 81111bc commit f1227a9
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ public void listIsOrderedIfFormattedAsDecimal() {
assertEquals(true, numbering.findLevel("47", "1").get().isOrdered());
}

@Test
public void listIsOrderedIfThereIsNotExplicitFormat() {
XmlElement element = element("w:numbering", list(
element("w:abstractNum", map("w:abstractNumId", "42"), list(
element("w:lvl", map("w:ilvl", "0"))
)),
element("w:num", map("w:numId", "47"), list(
element("w:abstractNumId", map("w:val", "42"))
))
));

Numbering numbering = readNumbering(element);

assertEquals(true, numbering.findLevel("47", "0").get().isOrdered());
}

@Test
public void numReferencingNonExistentAbstractNumIsIgnored() {
XmlElement element = element("w:numbering", list(
Expand Down

0 comments on commit f1227a9

Please sign in to comment.