document

package
Version: v0.0.0-...-c44611c Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto