chiark / gitweb /
Move unused dependency to test deps
[nailing-cargo.git] / t / toml-test / valid / string-with-pound.t
1 # File automatically generated from BurntSushi/toml-test
2 use utf8;
3 use Test2::V0;
4 use Data::Dumper;
5 use DateTime;
6 use DateTime::Format::RFC3339;
7 use Math::BigInt;
8 use Math::BigFloat;
9 use TOML::Tiny;
10
11 binmode STDIN,  ':encoding(UTF-8)';
12 binmode STDOUT, ':encoding(UTF-8)';
13
14 my $expected1 = {
15                'poundcomment' => 'But there are # some comments here.',
16                'pound' => 'We see no # comments here.'
17              };
18
19
20 my $actual = from_toml(q{pound = "We see no # comments here."
21 poundcomment = "But there are # some comments here." # Did I # mess you up?
22 });
23
24 is($actual, $expected1, 'string-with-pound - from_toml') or do{
25   diag 'EXPECTED:';
26   diag Dumper($expected1);
27
28   diag 'ACTUAL:';
29   diag Dumper($actual);
30 };
31
32 is(eval{ from_toml(to_toml($actual)) }, $actual, 'string-with-pound - to_toml') or do{
33   diag 'INPUT:';
34   diag Dumper($actual);
35
36   diag 'TOML OUTPUT:';
37   diag to_toml($actual);
38
39   diag 'REPARSED OUTPUT:';
40   diag Dumper(from_toml(to_toml($actual)));
41 };
42
43 done_testing;