1 # File automatically generated from BurntSushi/toml-test
7 binmode STDIN, ':encoding(UTF-8)';
8 binmode STDOUT, ':encoding(UTF-8)';
15 '_file' => '(eval 373)',
16 'operator' => 'CODE(...)',
17 'name' => '<Custom Code>',
22 BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
27 'Math::BigInt'->new('6')->beq($_);
29 }, 'Test2::Compare::Custom' ),
32 BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
37 'Math::BigInt'->new('28')->beq($_);
42 'name' => '<Custom Code>',
43 'operator' => 'CODE(...)',
44 '_file' => '(eval 374)'
45 }, 'Test2::Compare::Custom' ),
47 'name' => '<Custom Code>',
48 'operator' => 'CODE(...)',
53 BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
58 'Math::BigInt'->new('496')->beq($_);
60 '_file' => '(eval 375)'
61 }, 'Test2::Compare::Custom' )
64 'best-day-ever' => bless( {
66 BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
70 my $exp = 'DateTime::Format::RFC3339'->parse_datetime('1987-07-05T17:45:00Z');
71 my $got = 'DateTime::Format::RFC3339'->parse_datetime($_);
72 $exp->set_time_zone('UTC');
73 $got->set_time_zone('UTC');
74 return 'DateTime'->compare($got, $exp) == 0;
79 'name' => '<Custom Code>',
80 'operator' => 'CODE(...)',
81 '_file' => '(eval 376)'
82 }, 'Test2::Compare::Custom' )
86 my $actual = from_toml(q{best-day-ever = 1987-07-05T17:45:00Z
90 perfection = [6, 28, 496]
93 is($actual, $expected1, 'example - from_toml') or do{
95 diag Dumper($expected1);
101 is(eval{ from_toml(to_toml($actual)) }, $actual, 'example - to_toml') or do{
103 diag Dumper($actual);
106 diag to_toml($actual);
108 diag 'REPARSED OUTPUT:';
109 diag Dumper(from_toml(to_toml($actual)));