On 09/15/2011 12:28 PM, Jim Meyering wrote:
diff --git a/tests/init.cfg b/tests/init.cfg
index f6ead9c..42889e6 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -78,3 +78,10 @@ require_ru_RU_koi8_r()
*) skip_test_ 'ru_RU.KOI8-R locale not found' ;;
esac
}
+
+require_compiled_in_MBS_support()
^^^
either MB or MBCS
+{
+ require_en_utf8_locale_
+ printf 'é' | LC_ALL=en_US.UTF-8 grep '[[:lower:]]' \
+ || skip_ this test requires MBS support
+}
I think a better test is
printf '\xc3' | LC_ALL=en_US.UTF-8 grep '[é]'
Otherwise you're relying on glibc providing a full definition of
[[:lower:]].
However, this test is already in use in tests/char-class-multibyte as a
testcase. So if you make the change you need to remove this bit from
char-class-multibyte.
for LOC in en_US.UTF-8 $LOCALE_FR_UTF8; do
out=out3-$LOC
printf '\xc3\n' | LC_ALL=$LOC grep '[é]' > $out
test $? = 1 || fail=1
done
I would also do this change quite early, before touching the code.
Paolo