chiark / gitweb /
New test, "rom", that renders and checks some fixed images
authorBen Harris <bjh21@bjh21.me.uk>
Sat, 12 Oct 2024 16:38:10 +0000 (17:38 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Sun, 13 Oct 2024 00:26:51 +0000 (01:26 +0100)
debian/tests/control
debian/tests/rom [new file with mode: 0644]

index d94a2a6fcf6730124b3d238c2c93247888c79550..a5d9f5f6980886ab0747f1376bbeb0daede20b94 100644 (file)
@@ -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 (file)
index 0000000..cbf7c03
--- /dev/null
@@ -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 <<EOF
+9706945b02dd0e30823186ff0d73a49c0d98ed573499a057bab471add7ee28fb  saa5050.rom
+fbca455e494b49b982fa089c7d4431e4ebdba3f9d2d3bbc18b3055bec8b43aa4  saa5051.rom
+7967716e3eb9ee242abd0dd91522c7f8d3d2fb33e4d77e7237a699e99e5ec018  saa5052.rom
+48827ee9bd9ec0ab1667187f4a6875804f04ddf205d20ba024c8bb12c715f01e  saa5053.rom
+91e39ef74600f60054d07d81c29e1643cb71b24326b4abfc5dfa7cbc50a9649e  saa5054.rom
+426114070da8ecb713de15b136a4dae94542a55a450719c219234584588ccfb6  saa5055.rom
+291ad99ed562fb2981f9f8d7c5b15fc7b1336ac2c6a33b51bf74023967639491  saa5056.rom
+d43948de67109452f70616e9a1d163694585c8be0049610439b6f9aa28a2973c  saa5057.rom
+EOF