diff --git a/tests/default_fonts/test.sh b/tests/default_fonts/test.sh index 6b54a68..ce024e3 100755 --- a/tests/default_fonts/test.sh +++ b/tests/default_fonts/test.sh @@ -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 diff --git a/tests/generic_alias/test.sh b/tests/generic_alias/test.sh index ec79df1..b9cc12d 100755 --- a/tests/generic_alias/test.sh +++ b/tests/generic_alias/test.sh @@ -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 } diff --git a/tests/lang_coverage/test.sh b/tests/lang_coverage/test.sh index 03cbc94..70f353c 100755 --- a/tests/lang_coverage/test.sh +++ b/tests/lang_coverage/test.sh @@ -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"