You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fa0634a
Browse filesBrowse the repository at this point in the historyBrowse files
test: pin ods truncation inside tags and rows, covered and skipped cells, annotations, empty tables and writer whitespace, widths and column freezes (#175)
From the triage of the Stryker.NET run (#151). These are tests only.
Each pins behaviour that is right today but that a surviving mutant
broke without any test noticing.
**Reader:**
- **B1:** a content part that ends inside a tag behind the first sheet
lists `["A"]` and reads A. The cut falls in an element name, a table
start tag, an attribute value, an end tag, a style or its table
properties, a comment, CDATA or a processing instruction. One case cuts
a name longer than everything before it, so the buffer holds nothing
past the end but that name. These mutants loop forever or read past the
buffer. Every case runs on a background thread of its own against a 20 s
deadline, so a hang fails the test and the run still ends.
- **B3:** a part that ends inside a row is refused as `Truncated` at the
first `ReadRow`. The cut falls between cells, in a cell's text, in a
typed cell that is passed over, in a covered cell or inside a tag.
- **A3:** a covered cell that still holds a float or a string reads as
empty, repeats included. The cell after it keeps its column.
- **A4:** once a sheet has ended, `ReadRow` keeps returning false and
never hands out the next sheet's rows. Moving to that sheet still reads
them.
- **A5:** a cell whose value is in its attributes is skipped exactly to
its own end tag. That holds for a float with two `<text:s/>`, a float
holding a sub-table and a stated string holding a sub-table. The next
cell and the next row read as written.
- **A6:** an annotation among the paragraphs adds no text and no line.
This covers an annotation with spaces, tabs and line breaks, an empty
annotation, one standing first, and one inside a paragraph, whose tail
is kept.
- **A7:** `IsoDurationTests.Inputs` gains `PT0.1234567891S`,
`PT2147483647S`, `PT2147483647M`, `PT1.99999999999` and
`PT.99999999999`. Each is checked against `XmlConvert`.
- **A12:** an empty `<table:table/>`, with or without a space before the
slash, is no sheet. This holds in UTF-8 and UTF-16, and the sheet behind
it reads as its own.
**Writer:**
- **G11:** a space after a tab, after a line break or at the start of a
value is written as `<text:s text:c="1"/>`. Since #161 the reader folds
white space as ODF does, so a plain space there would be lost. Each case
also round-trips.
- **G12:** column styles `co1` and `co19` have widths of exactly
`0.125in` and `1.4375in`.
- **G13:** a sheet that freezes only columns writes
`HorizontalSplitMode` 2 and `VerticalSplitMode` 0 in `settings.xml`.
Each group's main mutants were applied by hand. The new tests fail
against them and pass once they are reverted.
All of them passed against the current code.
Refs #151.
0 commit comments