Shlomi Fish <shlo...@shlomifish.org> writes:

> Hi all,
>
> in this XML-LibXML report:
>
> http://www.cpantesters.org/cpan/report/ac789d82-a3c1-11e0-a5fb-147eb1a38d13
>
> one of the tests fails because the error message is localised.
>
> How can I enforce a certain locale at the test script's start up for testing?

You can try POSIX::setlocale, maybe it will work.

Or you could get the localized error message and put it into the test
regexp:

    $ env LC_ALL=de_DE.ISO8859-1 perl -MErrno=ENOENT -Mstrict -e '$!=ENOENT; 
print "$!\n"' 
    Datei oder Verzeichnis nicht gefunden
    $ env LC_ALL=C perl -MErrno=ENOENT -Mstrict -e '$!=ENOENT; print "$!\n"'    
          
    No such file or directory

Or maybe just don't check for the language-dependent part of the error
message.

Regards,
    Slaven

-- 
Slaven Rezic - slaven <at> rezic <dot> de

    tktimex - time recording tool
    http://sourceforge.net/projects/ptktools/

Reply via email to