document

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package document provides common utilities for performing comparison between documents produced during testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanContents

func CleanContents(contents string) string

CleanContents removes font 'IDs' and other PDF/PS metadata to ensure a stable diff.

func CompareFileContents

func CompareFileContents(ctx context.Context, output, golden, diffPath string) error

CompareFileContents compares the string contents given by output and golden and returns an error if there are any differences. If there are any differences between the given file contents then the results of the diff are written to diffPath.

func CompareFiles

func CompareFiles(ctx context.Context, output, golden, diffPath string) error

CompareFiles loads the contents of the given output and golden files and compares them for differences. If there are any differences between the two files then an error will be returned and the result of the diff are written to diffPath.

Types

This section is empty.

Jump to

Keyboard shortcuts

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