testutil

package
v0.0.0-...-ef4175d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package testutil provides shared test helpers for round-trip testing of Office documents (PPTX, DOCX, XLSX).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareZipFiles

func CompareZipFiles(t *testing.T, original, roundtrip string) (missing, extra, changed []string)

CompareZipFiles compares two ZIP files and returns lists of missing, extra, and changed parts.

func ReadZipParts

func ReadZipParts(path string) (map[string][]byte, error)

ReadZipParts reads all parts from a ZIP file (PPTX/DOCX/XLSX) into a map. Part names have leading slashes stripped for consistency.

func ShowDiff

func ShowDiff(t *testing.T, name string, orig, rt []byte)

ShowDiff shows the first difference between two byte slices for debugging. Only shows diffs for XML and .rels files.

func SortedKeys

func SortedKeys(m map[string][]byte) []string

SortedKeys returns the keys of a map sorted alphabetically.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL