From 5e5bb8c2a2d6d41c3d0ef93f5d6181e7f1070a33 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 12 Nov 2017 12:32:52 -0500 Subject: Remove default byte-for-byte comparison of generated PDF with reference PDF. This comparison step started as a means of assuring repeatability across platforms, but has been an ongoing source of frustration with ordering of internal dictionaries and resources. --- internal/example/example.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'internal') diff --git a/internal/example/example.go b/internal/example/example.go index e828c05..90f861a 100644 --- a/internal/example/example.go +++ b/internal/example/example.go @@ -114,6 +114,22 @@ func referenceCompare(fileStr string) (err error) { // filename printed to standard output with a success message. If the specified // error is not nil, its String() value is printed to standard output. func Summary(err error, fileStr string) { + if err == nil { + fileStr = filepath.ToSlash(fileStr) + fmt.Printf("Successfully generated %s\n", fileStr) + } else { + fmt.Println(err) + } +} + +// SummaryCompare generates a predictable report for use by test examples. If +// the specified error is nil, the generated file is compared with a reference +// copy for byte-for-byte equality. If the files match, then the filename +// delimiters are normalized and the filename printed to standard output with a +// success message. If the files do not match, this condition is reported on +// standard output. If the specified error is not nil, its String() value is +// printed to standard output. +func SummaryCompare(err error, fileStr string) { if err == nil { err = referenceCompare(fileStr) } -- cgit v1.2.1-24-ge1ad