diff options
Diffstat (limited to 't/dump-perl-types-514.t')
-rw-r--r-- | t/dump-perl-types-514.t | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/dump-perl-types-514.t b/t/dump-perl-types-514.t new file mode 100644 index 0000000..0ba4d9a --- /dev/null +++ b/t/dump-perl-types-514.t @@ -0,0 +1,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)" + |