#!/usr/bin/env perl
use strict;
use Test::More tests => 2;
use Encode;
my $yp = YAML::PP->new;
subtest mac => sub {
my $yaml = qq{x: "a\r b"\ry: b\r};
my $data = $yp->load_string($yaml);
my $expected = {
x => 'a b',
y => 'b',
};
is_deeply($data, $expected, 'Mac \r line endings');
};
subtest win => sub {
my $yaml = qq{x: "a\r\n b"\ry: b\r};
my $data = $yp->load_string($yaml);
my $expected = {
x => 'a b',
y => 'b',
};
is_deeply($data, $expected, 'Win \r\n line endings');
};
done_testing;