I can't understand what does the line "test -z "`echo $it | grep .cm`"
;" in function below?
check_locale_m()
{
printf "Checking \"locale -m\" output..." >$dbgout
loc_m_out=`${locale} -m`
for it in $loc_m_out; do
assertions=`expr $assertions + 1`
if test -z "`echo $it | grep .cm`" ; then
echo " incorrect." >$dbgout
echo "ERROR: \"locale -m\" failed." >$dbgout
echo >$dbgout
failedassertions=`expr $failedassertions + 1`
fi;
done;
echo " correct." >$dbgout
}
I suppose that in command 'grep .cm' ".cm" is a regular expression and
grep utility should print lines that contains <anychar>cm?
On my machine on Windows locale -m produces:
ANSI_X3.110-1983
ANSI_X3.4-1968
ASMO_449
BIG5
BIG5-HKSCS
BS_4730
BS_VIEWDATA
CP10007
CP1250
CP1251
CP1252
CP1253
CP1254
CP1255
CP1256
CP1257
CP1258
CP437
CP737
CP775
CP949
...
I not see the lines that matches to the ".cm" regexp. And because of
this
the sanity check fails.
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights r
Checking "locale --help" output... correct.
Checking "locale -a" output...check completed.
Checking "locale -m" output... incorrect.
ERROR: "locale -m" failed.
Checking "locale -k LC_ALL" output... correct.
Checking "localedef --help" output... correct.
# +-----------------------+--------+--------+--------+
# | DIAGNOSTIC | ACTIVE | TOTAL |INACTIVE|
# +-----------------------+--------+--------+--------+
# | (S7) ASSERTION | 1 | 49 | 98% |
# +-----------------------+--------+--------+--------+
## Assertions = 49
## FailedAssertions = 1
Where I wrong?
Farid.