Allow - for FC_LANG to skip test
This commit is contained in:
parent
73ab51bec7
commit
f1089fb6ca
3 changed files with 12 additions and 3 deletions
|
|
@ -22,6 +22,9 @@ function test_default_fonts {
|
|||
local defaultemoji=${7:-0}
|
||||
local defaultmath=${8:-0}
|
||||
|
||||
if [ "$fclang" == "-" ]; then
|
||||
fclang="en"
|
||||
fi
|
||||
rlPhaseStartTest "Default fonts test for $pkg"
|
||||
IFS=, read -ra langlist <<< "$fclang"
|
||||
for g in sans serif mono emoji math; do
|
||||
|
|
|
|||
|
|
@ -42,8 +42,12 @@ function test_generic_alias {
|
|||
rlPhaseStartTest "Generic alias test for $pkg"
|
||||
prepare_test $pkg
|
||||
rlRun "cat $tmpconfd/$pkg.conf"
|
||||
rlRun "FONTCONFIG_FILE=$tmpconfd/$pkg.conf fc-match -f \"%{family[0]}\\n\" \":family=$fcfamily:lang=$fclang:width=$fcwidth\" | tee output" 0 "Matching a font"
|
||||
rlAssertGrep "^$fcresult\$" "output"
|
||||
if [ "$fclang" == "-" ]; then
|
||||
rlLogInfo "$pkg:$fcfamily: Skipped."
|
||||
else
|
||||
rlRun "FONTCONFIG_FILE=$tmpconfd/$pkg.conf fc-match -f \"%{family[0]}\\n\" \":family=$fcfamily:lang=$fclang:width=$fcwidth\" | tee output" 0 "Matching a font"
|
||||
rlAssertGrep "^$fcresult\$" "output"
|
||||
fi
|
||||
rlPhaseEnd
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ function test_lang_coverage {
|
|||
for f in $(get_font_path $pkg); do
|
||||
if echo $f|grep -Eq "\.(t1|ttf|otf|ttc|otc|pcf.*|pfa)$"; then
|
||||
set -f
|
||||
if [ $(check_exception $fcexpat $f) -ne 0 ] && [ -f $f ]; then
|
||||
if [ "$fclang" == "-" ]; then
|
||||
rlLogInfo "Skipping $f (no language provided)"
|
||||
elif [ $(check_exception $fcexpat $f) -ne 0 ] && [ -f $f ]; then
|
||||
IFS=, read -ra langlist <<< "$fclang"
|
||||
for l in "${langlist[@]}"; do
|
||||
rlRun "fc-validate -l $l $f" 0 "$pkg:$(basename $f): Check language coverage for $l"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue