Al-HUWAITI Shell
Al-huwaiti


Server : Apache
System : Linux dedi-14684855.grupobig.com 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : grupo692 ( 1004)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /home/.cpan/build/YAML-LibYAML-v0.902.0-0/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/.cpan/build/YAML-LibYAML-v0.902.0-0/t/ascii.t
use FindBin '$Bin';
use lib $Bin;
use TestYAMLTests tests => 7;

is utf8::is_utf8(Load("--- Foo\n")), !!0, 'ASCII string does not have UTF8 flag on';

my $yaml1 = <<'...';
---
foo: foo
bar: bar
baz: baz
...

{
    my $hash = Load($yaml1);
    is utf8::is_utf8($hash->{foo}), !!0, 'ASCII string string does not have UTF8 flag on';
    is utf8::is_utf8($hash->{bar}), !!0, 'ASCII string string does not have UTF8 flag on';
    is utf8::is_utf8($hash->{baz}), !!0, 'ASCII string string does not have UTF8 flag on';
}


my $yaml2 = <<'...';
---
- foo
- bar
- baz
...

{
    my $array = Load($yaml2);
    is utf8::is_utf8($array->[0]), !!0, 'ASCII string string does not have UTF8 flag on';
    is utf8::is_utf8($array->[1]), !!0, 'ASCII string string does not have UTF8 flag on';
    is utf8::is_utf8($array->[2]), !!0, 'ASCII string string does not have UTF8 flag on';
}


Al-HUWAITI Shell