testutil

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package testutil provides fixtures and ZIP primitives for presentation tests. It must only be imported by tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadZIP

func ReadZIP(t testing.TB, data []byte) (map[string][]byte, []string)

ReadZIP returns byte parts and their archive order.

func ReadZIPStrings

func ReadZIPStrings(t testing.TB, data []byte) map[string]string

ReadZIPStrings reads parts for tests that assert on XML text.

func SwapFirstTwoSlideIDs added in v0.0.11

func SwapFirstTwoSlideIDs(t testing.TB, presentationXML []byte) []byte

SwapFirstTwoSlideIDs swaps the first two slide relationships in presentation XML, renumbering slide IDs while preserving all XML outside the slide list.

func WriteZIP

func WriteZIP(t testing.TB, parts map[string][]byte, order []string) []byte

WriteZIP preserves the supplied order, omits deleted parts, and appends new parts sorted by name. A nil order creates a new archive sorted by name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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