1 # File automatically generated from BurntSushi/toml-test
6 use DateTime::Format::RFC3339;
11 binmode STDIN, ':encoding(UTF-8)';
12 binmode STDOUT, ':encoding(UTF-8)';
16 'last' => 'Preston-Werner',
25 BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
30 'Math::BigInt'->new('1')->beq($_);
32 '_file' => '(eval 401)',
33 'name' => '<Custom Code>',
34 'operator' => 'CODE(...)'
35 }, 'Test2::Compare::Custom' ),
41 BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
46 'Math::BigInt'->new('2')->beq($_);
48 '_file' => '(eval 400)',
49 'operator' => 'CODE(...)',
50 'name' => '<Custom Code>'
51 }, 'Test2::Compare::Custom' )
55 'name' => '<Custom Code>',
56 'operator' => 'CODE(...)',
57 '_file' => '(eval 399)',
59 BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
64 'Math::BigInt'->new('1')->beq($_);
69 }, 'Test2::Compare::Custom' )
74 'name' => '<Custom Code>',
75 'operator' => 'CODE(...)',
76 '_file' => '(eval 403)',
78 BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
83 'Math::BigInt'->new('1')->beq($_);
88 }, 'Test2::Compare::Custom' )
92 'name' => '<Custom Code>',
93 'operator' => 'CODE(...)',
95 BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
100 'Math::BigInt'->new('2')->beq($_);
102 '_file' => '(eval 404)',
106 }, 'Test2::Compare::Custom' )
111 '_file' => '(eval 402)',
113 BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x54"}
117 require Math::BigInt;
118 'Math::BigInt'->new('1')->beq($_);
120 'name' => '<Custom Code>',
121 'operator' => 'CODE(...)',
125 }, 'Test2::Compare::Custom' )
130 my $actual = from_toml(q{name = { first = "Tom", last = "Preston-Werner" }
131 point = { x = 1, y = 2 }
133 str-key = { "a" = 1 }
134 table-array = [{ "a" = 1 }, { "b" = 2 }]
137 is($actual, $expected1, 'inline-table - from_toml') or do{
139 diag Dumper($expected1);
142 diag Dumper($actual);
145 is(eval{ from_toml(to_toml($actual)) }, $actual, 'inline-table - to_toml') or do{
147 diag Dumper($actual);
150 diag to_toml($actual);
152 diag 'REPARSED OUTPUT:';
153 diag Dumper(from_toml(to_toml($actual)));