usbprintertests

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: 13 Imported by: 0

Documentation

Overview

Package usbprintertests provides utility functions for running tests with a USB printer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunIPPUSBPPDTest

func RunIPPUSBPPDTest(ctx context.Context, s *testing.State, attributes string, ppdAttributes map[string]string)

RunIPPUSBPPDTest configures an IPP-over-USB printer using the virtual USB printer configured using the given attributes and the well-known default descriptors. Once the printer has been automatically configured by CUPS, the attributes of the generated PPD file are checked against the provided ppdAttributes map. If there are any differences in values between the generated PPD and ppdAttributes for the same key, then the test will fail.

func RunPrintTest

func RunPrintTest(ctx context.Context, s *testing.State,
	opts []usbprinter.Option, record, ppd, toPrint, golden string)

RunPrintTest executes a test for the virtual USB printer defined by the given arguments. This tests that the printer is able to be configured, and produces the expected output at record when a print job is issued. toPrint and golden specify the paths to the file to be printed and the expected printer output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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