aboutsummaryrefslogtreecommitdiff
path: root/internal/extract/zipxml_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/extract/zipxml_test.go')
-rw-r--r--internal/extract/zipxml_test.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/internal/extract/zipxml_test.go b/internal/extract/zipxml_test.go
index 30a4cf9..5b7ba54 100644
--- a/internal/extract/zipxml_test.go
+++ b/internal/extract/zipxml_test.go
@@ -128,10 +128,9 @@ func TestOdfEmbeddedObjectIncluded(t *testing.T) {
// The footer's mismatched end tag (</w:xyz> where </w:ftr> was open)
// genuinely fails to parse under Strict=false — unlike a merely missing
// end tag, which the decoder synthesises and swallows — but only after
-// "broken" and the newline for </w:p> have already been written; the
-// XML decoder itself confirms this token by token (see fix round 2's
-// report for the trace): CharData "broken", EndElement p, then the
-// error "unexpected end element </xyz>".
+// "broken" and the newline for </w:p> have already been written; the XML
+// decoder itself confirms this token by token: CharData "broken",
+// EndElement p, then the error "unexpected end element </xyz>".
func TestZipLenientOnMalformedEntry(t *testing.T) {
e := newWithPath("")
got, err := text(t, e, zipFile(t, "partial.docx", map[string]string{
@@ -139,7 +138,7 @@ func TestZipLenientOnMalformedEntry(t *testing.T) {
"word/footer1.xml": `<w:ftr xmlns:w="w"><w:p><w:r><w:t>broken</w:t></w:r></w:p></w:xyz>`,
}), 0)
// Partly read: the text is kept, and ErrPartial says some of it is
- // missing, so a keyword not found in it is unknown (plan 11).
+ // missing, so a keyword not found in it is unknown.
if !errors.Is(err, ErrPartial) {
t.Fatalf("good entry alongside a malformed one: err %v, want ErrPartial", err)
}
@@ -193,9 +192,9 @@ func TestZipNoTextAndFailingSiblingErrors(t *testing.T) {
}
}
-// TestMaxReadCapsZipOutput: B1. A directory's max-read, when smaller than
-// the fixed zipBudget default, caps a single archive's extracted text on
-// its own — zipBudget is left at its default, so only budget(zipBudget,
+// TestMaxReadCapsZipOutput: a directory's max-read, when smaller than the
+// fixed zipBudget default, caps a single archive's extracted text on its
+// own — zipBudget is left at its default, so only budget(zipBudget,
// maxRead) picking the smaller maxRead explains the result.
func TestMaxReadCapsZipOutput(t *testing.T) {
e := newWithPath("")