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: Fix shellcheck error
Date: Thu, 13 Aug 2026 10:29:25 GMT [thread overview]
Message-ID: <178661696536.1.6355012186912301712.tests-fonts-26a4cb291c10@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/fonts
Branch : rhel9
Commit : 26a4cb291c1007434d15108cf5100209058042b9
Author : Akira TAGOH <akira@tagoh.org>
Date : 2024-11-15T18:01:44+09:00
Stats : +11/-6 in 1 file(s)
URL : https://src.fedoraproject.org/tests/fonts/c/26a4cb291c1007434d15108cf5100209058042b9?branch=rhel9
Log:
default_fonts: Fix shellcheck error
---
diff --git a/tests/default_fonts/test.sh b/tests/default_fonts/test.sh
index 1c3a381..45a43ca 100755
--- a/tests/default_fonts/test.sh
+++ b/tests/default_fonts/test.sh
@@ -4,6 +4,7 @@
. /usr/share/beakerlib/beakerlib.sh || exit 1
+PACKAGE=${PACKAGE:-"blahblah-fonts"}
DEFAULT_SANS=${DEFAULT_SANS:-0}
DEFAULT_SERIF=${DEFAULT_SERIF:-0}
DEFAULT_MONO=${DEFAULT_MONO:-0}
@@ -17,10 +18,15 @@ function test_default_fonts {
local pkg=${1:-"unknown package"}
local fcfamily=${2:-"unknown family"}
local fclang=${3:-"en"}
+ # shellcheck disable=SC2034
local defaultsans=${4:-0}
+ # shellcheck disable=SC2034
local defaultserif=${5:-0}
+ # shellcheck disable=SC2034
local defaultmono=${6:-0}
+ # shellcheck disable=SC2034
local defaultemoji=${7:-0}
+ # shellcheck disable=SC2034
local defaultmath=${8:-0}
if [ "$fclang" == "-" ]; then
@@ -34,8 +40,7 @@ function test_default_fonts {
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
- rlAssertGrep "^$FONT_FAMILY\$" "output"
- if [ $? -ne 0 ]; then
+ if ! rlAssertGrep "^$fcfamily\$" "output"; then
rlLogInfo " Hints:"
rlLogInfo " This failed because of:"
rlLogInfo " 1) The actual result of font may have higher priority."
@@ -43,8 +48,7 @@ function test_default_fonts {
rlLogInfo " 3) The value of DEFAULT_${g^^} may be wrong."
fi
elif [ ${!v} -eq 0 ]; then
- rlAssertNotGrep "^$FONT_FAMILY\$" "output"
- if [ $? -ne 0 ]; then
+ if ! rlAssertNotGrep "^$fcfamily\$" "output"; then
rlLogInfo " Hints:"
rlLogInfo " This failed because of:"
rlLogInfo " 1) The actual result of font may have higher priority."
@@ -64,6 +68,7 @@ rlJournalStart
rlPhaseStartSetup
{
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
+ # shellcheck disable=SC2154
rlRun "pushd $tmp"
rlRun "set -o pipefail"
}
@@ -71,8 +76,8 @@ rlJournalStart
if [ -n "$VARLIST" ] && [ -f "$TMT_TREE/plans/$VARLIST" ]; then
rlLogInfo "Reading variables from $VARLIST"
- cat "$TMT_TREE/plans/$VARLIST" | grep -E -v "^#" | while IFS=";" read -r PACKAGE FONT_ALIAS FONT_LANG FONT_WIDTH FONT_FAMILY DEFAULT_SANS DEFAULT_SERIF DEFAULT_MONO DEFAULT_EMOJI DEFAULT_MATH dummy; do
- test_default_fonts "$PACKAGE" "$FONT_FAMILY" "$FONT_LANG" "$DEFAULT_SANS" "$DEFAULT_SERIF" "$DEFAULT_MONO" "$DEFAULT_EMOJI" "$DEFAULT_MATH"
+ 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 dummy; do
+ test_default_fonts "$_PACKAGE" "$_FONT_FAMILY" "$_FONT_LANG" "$_DEFAULT_SANS" "$_DEFAULT_SERIF" "$_DEFAULT_MONO" "$_DEFAULT_EMOJI" "$_DEFAULT_MATH"
done
else
test_default_fonts "$PACKAGE" "$FONT_FAMILY" "$FONT_LANG" "$DEFAULT_SANS" "$DEFAULT_SERIF" "$DEFAULT_MONO" "$DEFAULT_EMOJI" "$DEFAULT_MATH"
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=178661696536.1.6355012186912301712.tests-fonts-26a4cb291c10@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