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.