File: native.t

package info (click to toggle)
libyaml-libyaml-perl 0.76%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 688 kB
  • sloc: perl: 1,603; ansic: 1,140; sh: 29; makefile: 4
file content (17 lines) | stat: -rw-r--r-- 348 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use FindBin '$Bin';
use lib $Bin;
use TestYAMLTests tests => 1;

my $yaml = <<"...";
---
bar: \xC3\x83\xC2\xB6
foo: \xC3\xB6
...

my $hash = {
    foo => "\xF6",    # LATIN SMALL LETTER O WITH DIAERESIS U+00F6
    bar => "\xC3\xB6" # LATIN SMALL LETTER O WITH DIAERESIS U+00F6 (UTF-8)
};

is Dump($hash), $yaml, 'Dumping native characters works';