Test::More::UTF8(3)

okay bestie, welcome to Test::More::UTF8(3) β€” a User Contributed Perl Documentation page that’s lowkey a glow-up for UTF8-based Perl testing πŸ’–

🌸 NAME 🌸

Test::More::UTF8 β€” Enhancing Test::More for UTF8-based projects ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

use Test::More;
use Test::More::UTF8;

# now we can easily use flagged strings without warnings like "Wide character in print ..."
is("\x{410}","\x{420}"); # got a failure message without warnings

πŸŽ€ LIMITATIONS πŸŽ€

This module only has a reason to exist for perl 5.8 and higher, bestie. That’s the whole limitation vibe πŸ’…

🌈 FEATURES 🌈

It also switches on the utf8 pragma by default. To disable this, add the -utf8 option:

  • -utf8 β€” turns off that default-on utf8 pragma:
use Test::More::UTF8 qw(-utf8);

By default, binmode ':utf8' will be done on all output handles: failure_output, todo_output, output. You can choose only some of them, no cap:

  • failure β€” enable :utf8 only on failure_output:
use Test::More::UTF8 qw(failure); # enable :utf8 only on failure_output
  • todo β€” enable :utf8 only on todo_output:
use Test::More::UTF8 qw(todo); # enable :utf8 only on todo_output
  • out β€” enable :utf8 only on output:
use Test::More::UTF8 qw(out); # enable :utf8 only on output

πŸ‘‘ AUTHOR πŸ‘‘

Mons Anderson, <mons@cpan.org> 🫢

πŸ’€ BUGS πŸ’€

None known β€” periodt πŸ’…

Copyright 2009 Mons Anderson, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


made with πŸ’– from perl v5.42.0, dated 2017-06-25, for Test::More::UTF8(3) β€” bye bestie! 🫢

πŸ“¦ where this page comes from