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 system-ui support
Date: Thu, 13 Aug 2026 10:29:32 GMT	[thread overview]
Message-ID: <178661697218.1.13211283913799872693.tests-fonts-702d38b8a7af@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : tests/fonts
Branch : rhel9
Commit : 702d38b8a7afb5a305445f59555ae451921dbf26
Author : Akira TAGOH <akira@tagoh.org>
Date   : 2025-11-25T11:31:25+09:00
Stats  : +25/-25 in 2 file(s)
URL    : https://src.fedoraproject.org/tests/fonts/c/702d38b8a7afb5a305445f59555ae451921dbf26?branch=rhel9

Log:
default_fonts: add system-ui support

---
diff --git a/README.rst b/README.rst
index d62c0aa..6857908 100644
--- a/README.rst
+++ b/README.rst
@@ -77,6 +77,11 @@ Available test cases
     default value is ``0``. set ``1`` if the targeted font package is supposed to
     be a default font for math.
 
+  - DEFAULT_SYSTEMUI (optional)
+
+    default value is ``0``. set ``1`` if the targeted font package is supposed to
+    be a default font for system-ui.
+
   - FONT_FAMILY
   - FONT_LANG (optional)
 

diff --git a/tests/default_fonts/test.sh b/tests/default_fonts/test.sh
index 1c39d0d..811209b 100755
--- a/tests/default_fonts/test.sh
+++ b/tests/default_fonts/test.sh
@@ -3,6 +3,7 @@
 # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
 
 . /usr/share/beakerlib/beakerlib.sh || exit 1
+. ../functions
 
 PACKAGE=${PACKAGE:-"blahblah-fonts"}
 DEFAULT_SANS=${DEFAULT_SANS:-0}
@@ -10,24 +11,28 @@ DEFAULT_SERIF=${DEFAULT_SERIF:-0}
 DEFAULT_MONO=${DEFAULT_MONO:-0}
 DEFAULT_EMOJI=${DEFAULT_EMOJI:-0}
 DEFAULT_MATH=${DEFAULT_MATH:-0}
+DEFAULT_SYSTEMUI=${DEFAULT_SYSTEMUI:-0}
 FONT_FAMILY=${FONT_FAMILY:-"family name"}
 FONT_LANG=${FONT_LANG:-"en"}
 VARLIST=${VARLIST:-}
 
 function test_default_fonts {
-    local pkg=${1:-"unknown package"}
-    local fcfamily=${2:-"unknown family"}
-    local fclang=${3:-"en"}
+    local elems=("$@")
+    local pkg=${elems[0]:-"unknown package"}
+    local fcfamily=${elems[1]:-"unknown family"}
+    local fclang=${elems[2]:-"en"}
     # shellcheck disable=SC2034
-    local defaultsans=${4:-0}
+    local defaultsans=${elems[3]:-0}
     # shellcheck disable=SC2034
-    local defaultserif=${5:-0}
+    local defaultserif=${elems[4]:-0}
     # shellcheck disable=SC2034
-    local defaultmono=${6:-0}
+    local defaultmono=${elems[5]:-0}
     # shellcheck disable=SC2034
-    local defaultemoji=${7:-0}
+    local defaultemoji=${elems[6]:-0}
     # shellcheck disable=SC2034
-    local defaultmath=${8:-0}
+    local defaultmath=${elems[7]:-0}
+    # shellcheck disable=SC2034
+    local defaultsystemui=${elems[8]:-0}
 
     if [ "$fclang" == "-" ]; then
         fclang="en"
@@ -35,11 +40,11 @@ function test_default_fonts {
     rlPhaseStartTest "Default fonts test for $pkg"
     {
         IFS=, read -ra langlist <<< "$fclang"
-        for g in sans serif mono emoji math; do
+        for g in sans serif mono emoji math system-ui; do
             for l in "${langlist[@]}"; do
-                v="default$g"
+                v="default${g//-/}"
                 rlRun "fc-match -f \"%{family[0]}\\n\" \":family=$g:lang=${l/und*/en}\" | tee output" 0 "Checking $g default font for lang ${l/und*/en}"
-                if [ ${!v} -eq 1 ]; then
+                if [ "${!v}" -eq 1 ]; then
                     if ! rlAssertGrep "^$fcfamily\$" "output"; then
                         rlLogInfo "    Hints:"
                         rlLogInfo "      This failed because of:"
@@ -47,7 +52,7 @@ function test_default_fonts {
                         rlLogInfo "        2) fontconfig file may be missing the generic alias rule for $g"
                         rlLogInfo "        3) The value of DEFAULT_${g^^} may be wrong."
                     fi
-                elif [ ${!v} -eq 0 ]; then
+                elif [ "${!v}" -eq 0 ]; then
                     if ! rlAssertNotGrep "^$fcfamily\$" "output"; then
                         rlLogInfo "    Hints:"
                         rlLogInfo "      This failed because of:"
@@ -77,21 +82,11 @@ rlJournalStart
     if [ -n "$VARLIST" ] && [ ! -f "$TMT_TREE/plans/$VARLIST" ]; then
         rlLogWarning "No $VARLIST in VARLIST envvar at \$TMT_TREE/plans"
     fi
+    args=("PACKAGE" "FONT_FAMILY" "FONT_LANG" "DEFAULT_SANS" "DEFAULT_SERIF" "DEFAULT_MONO" "DEFAULT_EMOJI" "DEFAULT_MATH" "DEFAULT_SYSTEMUI")
     if [ -n "$VARLIST" ] && [ -f "$TMT_TREE/plans/$VARLIST" ]; then
-        rlLogInfo "Reading variables from $VARLIST"
-        grep -E -v "^#" "$TMT_TREE/plans/$VARLIST" | while IFS=";" read -r _PACKAGE _FONT_ALIAS _FONT_LANG _FONT_WIDTH _FONT_FAMILY _DEFAULT_SANS _DEFAULT_SERIF _DEFAULT_MONO _DEFAULT_EMOJI _DEFAULT_MATH FONT_LANG_EXCLUDE_FILES FONT_VALIDATE_EXCLUDE_FILES FONT_CONF_EXCLUDE_FILES FONT_VALIDATE_INDEXES FONT_LANG_INDEXES dummy; do
-            rlLogInfo "  PACKAGE: $_PACKAGE"
-            rlLogInfo "  FONT_FAMILY: $_FONT_FAMILY"
-            rlLogInfo "  FONT_LANG: $_FONT_LANG"
-            rlLogInfo "  DEFAULT_SANS: $_DEFAULT_SANS"
-            rlLogInfo "  DEFAULT_SERIF: $_DEFAULT_SERIF"
-            rlLogInfo "  DEFAULT_MONO: $_DEFAULT_MONO"
-            rlLogInfo "  DEFAULT_EMOJI: $_DEFAULT_EMOJI"
-            rlLogInfo "  DEFAULT_MATH: $_DEFAULT_MATH"
-            test_default_fonts "$_PACKAGE" "$_FONT_FAMILY" "$_FONT_LANG" "$_DEFAULT_SANS" "$_DEFAULT_SERIF" "$_DEFAULT_MONO" "$_DEFAULT_EMOJI" "$_DEFAULT_MATH"
-        done
+        read_varlist "$TMT_TREE/plans/$VARLIST" "test_default_fonts" "${args[@]}"
     else
-        test_default_fonts "$PACKAGE" "$FONT_FAMILY" "$FONT_LANG" "$DEFAULT_SANS" "$DEFAULT_SERIF" "$DEFAULT_MONO" "$DEFAULT_EMOJI" "$DEFAULT_MATH"
+        call_test "test_default_fonts" "${args[@]}"
     fi
 
     rlPhaseStartCleanup

                 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=178661697218.1.13211283913799872693.tests-fonts-702d38b8a7af@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