From 6c4106a89898a58fe07582c917c6364aa5cdfc93 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 12 Oct 2024 14:47:33 +0100 Subject: [PATCH] Add a simple autopkgtest to check fc-list can see Bedstead This is marked as superficial because it only checks that the fonts exist, and not what they look like. --- debian/tests/control | 3 +++ debian/tests/fc-list | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 debian/tests/control create mode 100644 debian/tests/fc-list diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..d94a2a6 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Tests: fc-list +Depends: @, fontconfig +Restrictions: superficial diff --git a/debian/tests/fc-list b/debian/tests/fc-list new file mode 100644 index 0000000..327d811 --- /dev/null +++ b/debian/tests/fc-list @@ -0,0 +1,38 @@ +#! /bin/bash + +# Check that Fontconfig can find all of the Bedstead fonts that should +# be installed. This doesn't check the precise output of fc-list +# because the test system might contain additional fonts that match +# "Bedstead". + +set -euo pipefail + +cd -- "${AUTOPKGTEST_TMP}" + +sort >expected <actual + +echo "fc-list output:" +cat actual + +comm -13 actual expected >missing + +if [ -s missing ]; then + echo "Missing from fc-list output:" + cat missing + exit 1 +fi -- 2.30.2