Test::More a utf-8
Honza Pazdziora
adelton na fi.muni.cz
Pátek Březen 2 16:13:19 MET 2007
On Fri, Mar 02, 2007 at 03:34:24PM +0100, Jan Kasprzak wrote:
> Proc Test::More nema rado utf-8 znakova data?
> Priklad:
>
> $ cat t.t
>
> binmode STDOUT, ':utf8';
> binmode STDERR, ':utf8';
> use utf8;
> use Test::More qw(no_plan);
>
> is('ježek', 'tučňák', 'jen pokus');
>
> $ perl -CSD t.t
> not ok 1 - jen pokus
> # Failed test 'jen pokus'
> # in t.t at line 8.
> Wide character in print at /usr/lib/perl5/5.8.8/Test/Builder.pm line 1199.
> # got: 'ježek'
> # expected: 'tučňák'
> 1..1
> # Looks like you failed 1 test of 1.
> $
>
> Nelibi se mi ta hlaska o "Wide character", ktera tam je i pres
> -CSD a binmode.
Dokumentace Test::Builderu rika
It’s ok for your test to change where STDOUT and STDERR
point to, Test::Builder’s default output settings will not
be affected.
takze ten Tvuj binmode asi nezmenil binmode toho reportovaciho
filehandlu.
Jak ale donutit Test::More, aby se choval lip, nevim. Cili asi se
ponorit do zdrojaku ...
--
------------------------------------------------------------------------
Honza Pazdziora | adelton na fi.muni.cz | http://www.fi.muni.cz/~adelton/
.project: Perl, C, Red Hat Network, IPv6, VoIP
Only self-confident people can be simple.
Další informace o konferenci Perl