stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Far...@kyiv.vdiweb.com>
Subject run_locale_utils.sh
Date Thu, 17 Aug 2006 15:07:18 GMT
  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.

Mime
View raw message