public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Akira TAGOH <akira@tagoh.org>
To: git-commits@fedoraproject.org
Subject: [tests/fonts] rhel9: default_fonts: Add new test case
Date: Thu, 13 Aug 2026 10:29:07 GMT [thread overview]
Message-ID: <178661694759.1.14737597021266696126.tests-fonts-f69b8c996374@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/fonts
Branch : rhel9
Commit : f69b8c9963744e4820ed000223759c1caec4178c
Author : Akira TAGOH <akira@tagoh.org>
Date : 2024-06-21T17:00:34+09:00
Stats : +81/-0 in 3 file(s)
URL : https://src.fedoraproject.org/tests/fonts/c/f69b8c9963744e4820ed000223759c1caec4178c?branch=rhel9
Log:
default_fonts: Add new test case
---
diff --git a/README.rst b/README.rst
index 5e7c335..fbb1640 100644
--- a/README.rst
+++ b/README.rst
@@ -38,6 +38,42 @@ Template
Available test cases
--------------------
+- Default fonts
+
+ A test case to check if the targeted font package affects various default
+ generic alias selection.
+ The following parameters are used in this test:
+
+ - DEFAULT_SANS (optional)
+
+ default value is 0. set 1 if the targeted font package is supposed to
+ be a default font for sans-serif on a certain language.
+
+ - DEFAULT_SERIF (optional)
+
+ default value is 0. set 1 if the targeted font package is supposed to
+ be a default font for serif on a certain language.
+
+ - DEFAULT_MONO (optional)
+
+ default value is 0. set 1 if the targeted font package is supposed to
+ be a default font for monospace on a certain language.
+
+ - DEFAULT_EMOJI (optional)
+
+ default value is 0. set 1 if the targeted font package is supposed to
+ be a default font for emoji.
+
+ - DEFAULT_MATH (optional)
+
+ default value is 0. set 1 if the targeted font package is supposed to
+ be a default font for math.
+
+ - FONT_FAMILY
+ - FONT_LANG (optional)
+
+ default value is en. en will be used for und-zsye (emoji) and und-zmth (math).
+
- Generic alias
A test case to check if the expected generic alias is properly assigned.
diff --git a/tests/default_fonts/main.fmf b/tests/default_fonts/main.fmf
new file mode 100644
index 0000000..3c3d5e1
--- /dev/null
+++ b/tests/default_fonts/main.fmf
@@ -0,0 +1,6 @@
+summary: Impact to default fonts
+description: >
+ This aims to avoid a brakage to default fonts selection
+ when installing the targeted package.
+require+:
+ - default-fonts
diff --git a/tests/default_fonts/test.sh b/tests/default_fonts/test.sh
new file mode 100755
index 0000000..1012a50
--- /dev/null
+++ b/tests/default_fonts/test.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+DEFAULT_SANS=${DEFAULT_SANS:-0}
+DEFAULT_SERIF=${DEFAULT_SERIF:-0}
+DEFAULT_MONO=${DEFAULT_MONO:-0}
+DEFAULT_EMOJI=${DEFAULT_EMOJI:-0}
+DEFAULT_MATH=${DEFAULT_MATH:-0}
+FONT_FAMILY=${FONT_FAMILY:-"family name"}
+FONT_LANG=${FONT_LANG:-"en"}
+
+rlJournalStart
+ rlPhaseStartSetup
+ rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
+ rlRun "pushd $tmp"
+ rlRun "set -o pipefail"
+ rlPhaseEnd
+
+ rlPhaseStartTest
+ IFS=, read -ra langlist <<< "$FONT_LANG"
+ for g in sans serif mono emoji math; do
+ for l in "${langlist[@]}"; do
+ v="DEFAULT_${g^^}"
+ rlRun "fc-match -f \"%{family[0]}\" \":family=$g:lang=${l/und*/en}\" | tee output" 0 "Checking $g default font for lang $l"
+ if [ ${!v} -eq 1 ]; then
+ rlAssertGrep "$FONT_FAMILY" "output"
+ else
+ rlAssertNotGrep "$FONT_FAMILY" "output"
+ fi
+ done
+ done
+ rlPhaseEnd
+
+ rlPhaseStartCleanup
+ rlRun "popd"
+ rlRun "rm -r $tmp" 0 "Remove tmp directory"
+ rlPhaseEnd
+rlJournalEnd
reply other threads:[~2026-08-13 10:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178661694759.1.14737597021266696126.tests-fonts-f69b8c996374@fedoraproject.org \
--to=akira@tagoh.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox