summaryrefslogtreecommitdiff
path: root/t/dump-perl-types-512.t
blob: 89b9822ec2dcec08b881ebc04ba16fcec0a95289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use strict;
use lib -e 't' ? 't' : 'test';
use Test::More;
BEGIN {
  if ( qr/x/ =~ /\(\?\^/ ){
    plan skip_all => "test only for perls before v5.13.5-11-gfb85c04";
  }
}
use TestYAML tests => 2;

filters { perl => ['eval', 'yaml_dump'] };

no_diff;
run_is ( perl => 'yaml' );

__DATA__
=== Regular Expression
+++ perl: qr{perfect match};
+++ yaml
--- !!perl/regexp (?-xism:perfect match)

=== Regular Expression with newline
+++ perl
qr{perfect
match}x;
+++ yaml
--- !!perl/regexp "(?x-ism:perfect\nmatch)"