chiark / gitweb /
dd3a70dcfd9b14f5f8c2897c02de94205bb60ef6
[nailing-cargo.git] / t / toml-test / valid / right-curly-brace-after-boolean.t
1 # File automatically generated from BurntSushi/toml-test
2 use utf8;
3 use Test2::V0;
4 use Data::Dumper;
5 use TOML::Tiny;
6
7 binmode STDIN,  ':encoding(UTF-8)';
8 binmode STDOUT, ':encoding(UTF-8)';
9
10 my $expected1 = {
11                'black' => {
12                             'python' => '>3.6',
13                             'allow_prereleases' => 1,
14                             'version' => '>=18.9b0'
15                           }
16              };
17
18
19 my $actual = from_toml(q{black = { python=">3.6", version=">=18.9b0", allow_prereleases=true }
20 });
21
22 is($actual, $expected1, 'right-curly-brace-after-boolean - from_toml') or do{
23   diag 'EXPECTED:';
24   diag Dumper($expected1);
25
26   diag 'ACTUAL:';
27   diag Dumper($actual);
28 };
29
30 is(eval{ from_toml(to_toml($actual)) }, $actual, 'right-curly-brace-after-boolean - to_toml') or do{
31   diag 'INPUT:';
32   diag Dumper($actual);
33
34   diag 'TOML OUTPUT:';
35   diag to_toml($actual);
36
37   diag 'REPARSED OUTPUT:';
38   diag Dumper(from_toml(to_toml($actual)));
39 };
40
41 done_testing;