summaryrefslogtreecommitdiff
path: root/t/dump-perl-types-514.t
blob: 0ba4d9a2ff4f6a41b4f08c79106bc76adfda9496 (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 {
  unless ( qr/x/ =~ /\(\?\^/ ){
    plan skip_all => "test only for perls v5.13.5-11-gfb85c04 or later";
  }
}
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 (?^:perfect match)

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