File: yaml-str-colon-first.t

package info (click to toggle)
libyaml-syck-perl 1.20-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 932 kB
  • sloc: ansic: 3,987; perl: 3,387; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 321 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use Test::More tests => 129;
use YAML::Syck;

$YAML::Syck::ImplicitUnicode = 1;

for (my $i = 0; $i <= 2**12; $i += 32) {
    my $str = ":" . chr($i);
    my $dump = Dump( { foo => $str } );
    my $load = Load $dump;
    is($load->{foo}, $str, "our string #$i starting with a : survived the round-trip");
}