From 2e092de5d8a99b0a13d91c8c81ee302e2f089b87 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 12 Oct 2024 17:38:10 +0100 Subject: [PATCH] New test, "rom", that renders and checks some fixed images --- debian/tests/control | 3 +++ debian/tests/rom | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 debian/tests/rom diff --git a/debian/tests/control b/debian/tests/control index d94a2a6..a5d9f5f 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,6 @@ Tests: fc-list Depends: @, fontconfig Restrictions: superficial + +Tests: rom +Depends: @, ghostscript diff --git a/debian/tests/rom b/debian/tests/rom new file mode 100644 index 0000000..cbf7c03 --- /dev/null +++ b/debian/tests/rom @@ -0,0 +1,27 @@ +#! /bin/bash + +# Known-answer tests for Bedstead. rom.ps is meant to reproduce the +# SAA505x character ROM images, so its output should be invariant in +# the absence of bugs. The hashes here are not derived from real ROM +# images, but from a believed-good version of Bedstead. + +set -euo pipefail + +for i in 0 1 2 3 4 5 6 7; do + gs -I/usr/share/fonts/opentype/bedstead \ + -P -q -dSAFER -sDEVICE=bit -o "${AUTOPKGTEST_TMP}/saa505${i}.rom" \ + -- rom.ps "SAA505${i}" +done + +cd -- "${AUTOPKGTEST_TMP}" +cp -- *.rom "${AUTOPKGTEST_ARTIFACTS}" +sha256sum -c <