### ----------------------------------------------------
### -- Config::TOML
### -- Licenses: Unlicense
### -- Authors: 
### -- File: t/grammar-actions/02-arrays.rakutest
### ----------------------------------------------------
### -- Chunk 2 of 3
-array-of-mixed-strings.made.WHAT
        ┃   Success   ┃        ~~ Array
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-difficult-strings.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 53 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-difficult-strings.made.WHAT
        ┃   Success   ┃        ~~ Array
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-difficult-strings-leading-commas.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 54 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-difficult-strings-leading-commas
        ┃   Success   ┃        .made
        ┃             ┃        .WHAT ~~ Array
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-array-of-basic-strings.made,
        ["red", "maroon", "crimson"],
        q:to/EOF/
        ♪ [Is expected array value?] - 55 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-basic-strings.made
        ┃   Success   ┃        ~~ ["red", "maroon", "crimson"]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-basic-strings-newlines.made,
        ["red", "maroon", "crimson"],
        q:to/EOF/
        ♪ [Is expected array value?] - 56 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-basic-strings-newlines.made
        ┃   Success   ┃        ~~ ["red", "maroon", "crimson"]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-basic-empty-strings.made,
        ["", " ", "\t\t"],
        q:to/EOF/
        ♪ [Is expected array value?] - 57 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-basic-empty-strings.made
        ┃   Success   ┃        ~~ ["", " ", "\t\t"]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-basic-multiline-string.made,
        ["red"],
        q:to/EOF/
        ♪ [Is expected array value?] - 58 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-basic-multiline-string.made
        ┃   Success   ┃        ~~ ["red"]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-basic-multiline-strings.made,
        ["red", "maroon", "crimson"],
        q:to/EOF/
        ♪ [Is expected array value?] - 59 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-basic-multiline-strings.made
        ┃   Success   ┃        ~~ ["red", "maroon", "crimson"]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    # leading whitespace in this array is because TOML parser does not
    # parse heredocs like Raku, leading spaces on the outside edges of
    # multiline string delimiters are preserved
    is(
        $match-array-of-basic-multiline-strings-newlines.made,
        [
            "    red maroon \ncrimson\n    ",
            "    blue\n    aqua\n    turquoise\n    ",
            " brown tan\n auburn"
        ],
        q:to/EOF/
        ♪ [Is expected array value?] - 60 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-basic-multiline-strings-newlines
        ┃   Success   ┃        .made ~~ [ ... ]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-literal-strings.made,
        ["red", "maroon", "crimson"],
        q:to/EOF/
        ♪ [Is expected array value?] - 61 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-literal-strings.made
        ┃   Success   ┃        ~~ ["red", "maroon", "crimson"]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-literal-strings-newlines.made,
        ["red", "maroon", "crimson"],
        q:to/EOF/
        ♪ [Is expected array value?] - 62 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-literal-strings-newlines
        ┃   Success   ┃        .made ~~ ["red", "maroon", "crimson"]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-literal-empty-strings.made,
        ["", " ", "\t\t"],
        q:to/EOF/
        ♪ [Is expected array value?] - 63 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-literal-empty-strings.made
        ┃   Success   ┃        ~~ ["", " ", "\t\t"]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-literal-multiline-string.made,
        ["red"],
        q:to/EOF/
        ♪ [Is expected array value?] - 64 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-literal-multiline-string
        ┃   Success   ┃        .made ~~ ["red"]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-literal-multiline-strings.made,
        ["red", "maroon", "crimson"],
        q:to/EOF/
        ♪ [Is expected array value?] - 65 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-literal-multiline-strings
        ┃   Success   ┃        .made ~~ ["red", "maroon", "crimson"]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-literal-multiline-strings-newlines.made,
        [
            "    red \\\n    maroon \\\n    crimson\n    ",
            "    blue\n    aqua\n    turquoise\n    ",
            " brown tan auburn"
        ],
        q:to/EOF/
        ♪ [Is expected array value?] - 66 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-literal-multiline-strings-newlines
        ┃   Success   ┃        .made ~~ [ ... ]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-mixed-strings.made,
        ["first", "second", "third", "fourth", "", ""],
        q:to/EOF/
        ♪ [Is expected array value?] - 67 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-mixed-strings.made
        ┃   Success   ┃        ~~ ["first", "second", "third", "fourth", "", ""]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-difficult-strings.made,
        ["] ", " # ", "\\ ", "\\", "\\ ", "\\"],
        q:to/EOF/
        ♪ [Is expected array value?] - 68 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-difficult-strings.made
        ┃   Success   ┃        ~~ ["] ", " # ", "\\ ", "\\", "\\ ", "\\"]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-difficult-strings-leading-commas.made,
        ["] ", " # ", "\\ ", "\\", "\\ ", "\\"],
        q:to/EOF/
        ♪ [Is expected array value?] - 69 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-difficult-strings-leading-commas
        ┃   Success   ┃        .made ~~
        ┃             ┃             ["] ", " # ", "\\ ", "\\", "\\ ", "\\"]
        ┗━━━━━━━━━━━━━┛
        EOF
    );
});

# end array of strings grammar-actions tests }}}
# array of integers grammar-actions tests {{{

subtest({
    my Str $array-of-integers = '[ 8001, 8001, 8002 ]';
    my Str $array-of-integers-newlines = Q:to/EOF/.trim;
    [
        +99,
        42,
        0,
        -17,
        1_000,
        5_349_221,
        1_2_3_4_5
    ]
    EOF

    my Config::TOML::Parser::Actions $actions .= new;
    my $match-array-of-integers =
        Config::TOML::Parser::Grammar.parse(
            $array-of-integers,
            :$actions,
            :rule<array>
        );
    my $match-array-of-integers-newlines =
        Config::TOML::Parser::Grammar.parse(
            $array-of-integers-newlines,
            :$actions,
            :rule<array>
        );

    is(
        $match-array-of-integers.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($array-of-integers, :rule<array>)] - 70 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal array of integers
        ┃   Success   ┃    successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-integers-newlines.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($array-of-integers-newlines, :rule<array>)] - 71 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal array of integers
        ┃   Success   ┃    (with newlines) successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-array-of-integers.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 72 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-integers.made.WHAT
        ┃   Success   ┃        ~~ Array[Int]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-integers-newlines.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 73 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-integers-newlines.made.WHAT
        ┃   Success   ┃        ~~ Array
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-array-of-integers.made,
        [8001, 8001, 8002],
        q:to/EOF/
        ♪ [Is expected array value?] - 74 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-integers.made
        ┃   Success   ┃        ~~ [8001, 8001, 8002]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-integers-newlines.made,
        [99, 42, 0, -17, 1000, 5349221, 12345],
        q:to/EOF/
        ♪ [Is expected array value?] - 75 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-integers-newlines.made
        ┃   Success   ┃        ~~ [99, 42, 0, -17, 1000, 5349221, 12345]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
});

# end array of integers grammar-actions tests }}}
# array of floats grammar-actions tests {{{

subtest({
    my Str $array-of-floats = '[ 0.0, -1.1, +2.2, -3.3, +4.4, -5.5 ]';
    my Str $array-of-floats-newlines = Q:to/EOF/.trim;
    [
        +1.0,
        3.1415,
        -0.01,
        5_000e+22,
        -1e6,
        -2E-2,
        6.626e-34,
        9_224_617.445_991_228_313,
        1e1_000
    ]
    EOF

    my Config::TOML::Parser::Actions $actions .= new;
    my $match-array-of-floats =
        Config::TOML::Parser::Grammar.parse(
            $array-of-floats,
            :$actions,
            :rule<array>
        );
    my $match-array-of-floats-newlines =
        Config::TOML::Parser::Grammar.parse(
            $array-of-floats-newlines,
            :$actions,
            :rule<array>
        );

    is(
        $match-array-of-floats.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($array-of-floats, :rule<array>)] - 76 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal array of floats
        ┃   Success   ┃    successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-floats-newlines.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($array-of-floats-newlines, :rule<array>)] - 77 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal array of floats
        ┃   Success   ┃    (with newlines) successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-array-of-floats.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 78 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-floats.made.WHAT ~~ Array
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-floats-newlines.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 79 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-floats-newlines.made.WHAT
        ┃   Success   ┃        ~~ Array
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-array-of-floats.made,
        [0.0, -1.1, 2.2, -3.3, 4.4, -5.5],
        q:to/EOF/
        ♪ [Is expected array value?] - 80 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-floats.made
        ┃   Success   ┃        ~~ [0.0, -1.1, 2.2, -3.3, 4.4, -5.5]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-floats-newlines.made,
        [
            1.0,
            3.1415,
            -0.01,
            5000e22,
            -1e6,
            -2E-2,
            6.626e-34,
            9224617.445991228313,
            1e1000
        ],
        q:to/EOF/
        ♪ [Is expected array value?] - 81 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-floats-newlines.made.WHAT
        ┃   Success   ┃        ~~ [ ... ]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
});

# end array of floats grammar-actions tests }}}
# array of booleans grammar-actions tests {{{

subtest({
    my Str $array-of-booleans = '[true,false]';
    my Str $array-of-booleans-newlines = Q:to/EOF/.trim;
    [
        true
        , false
    ]
    EOF

    my Config::TOML::Parser::Actions $actions .= new;
    my $match-array-of-booleans =
        Config::TOML::Parser::Grammar.parse(
            $array-of-booleans,
            :$actions,
            :rule<array>
        );
    my $match-array-of-booleans-newlines =
        Config::TOML::Parser::Grammar.parse(
            $array-of-booleans-newlines,
            :$actions,
            :rule<array>
        );

    is(
        $match-array-of-booleans.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($array-of-booleans, :rule<array>)] - 82 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal array of booleans successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-booleans-newlines.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($array-of-booleans-newlines, :rule<array>)] - 83 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal array of booleans
        ┃   Success   ┃    (with newlines) successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-array-of-booleans.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 84 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-booleans.made.WHAT ~~ Array
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-booleans-newlines.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 85 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-booleans-newlines.made.WHAT ~~ Array
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-array-of-booleans.made,
        [True, False],
        q:to/EOF/
        ♪ [Is expected array value?] - 86 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-booleans.made ~~ [True, False]
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-booleans-newlines.made,
        [True, False],
        q:to/EOF/
        ♪ [Is expected array value?] - 87 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-booleans-newlines.made
        ┃   Success   ┃        ~~ [True, False]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
});

# end array of booleans grammar-actions tests }}}
# array of datetimes grammar-actions tests {{{

subtest({
    my Str $array-of-date-times = '[1979-05-27T07:32:00Z,]';
    my Str $array-of-date-times-newlines = Q:to/EOF/.trim;
    [
        1979-05-27T07:32:00Z,
        1979-05-27T00:32:00-07:00,
        1979-05-27T00:32:00.999999-07:00,
        1979-05-27T07:32:00,
        1979-05-27T00:32:00.999999,
        1979-05-27
    ]
    EOF

    # assume UTC when local offset unspecified in TOML dates
    my Config::TOML::Parser::Actions $actions .= new(:date-local-offset(0));
    my $match-array-of-date-times =
        Config::TOML::Parser::Grammar.parse(
            $array-of-date-times,
            :$actions,
            :rule<array>
        );
    my $match-array-of-date-times-newlines =
        Config::TOML::Parser::Grammar.parse(
            $array-of-date-times-newlines,
            :$actions,
            :rule<array>
        );

    is(
        $match-array-of-date-times.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($array-of-date-times, :rule<array>)] - 88 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal array of datetimes
        ┃   Success   ┃    successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-date-times-newlines.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse(
              $array-of-date-times-newlines,
              :rule<array>
           )] - 89 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal array of datetimes
        ┃   Success   ┃    (with newlines) successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-array-of-date-times.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 90 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-date-times.made.WHAT ~~ Array
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-date-times-newlines.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 91 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-date-times-newlines.made.WHAT
        ┃   Success   ┃        ~~ Array
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-array-of-date-times.made,
        ['1979-05-27T07:32:00Z'],
        q:to/EOF/
        ♪ [Is expected array value?] - 92 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-date-times.made ~~ [ ... ]
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-date-times-newlines.made,
        [
            '1979-05-27T07:32:00Z',
            '1979-05-27T00:32:00-07:00',
            '1979-05-27T00:32:00.999999-07:00',
            '1979-05-27T07:32:00Z',
            '1979-05-27T00:32:00.999999Z',
            '1979-05-27'
        ],
        q:to/EOF/
        ♪ [Is expected array value?] - 93 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-date-times-newlines.made
        ┃   Success   ┃        ~~ [ ... ]
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
});

# end array of datetimes grammar-actions tests }}}
# array of arrays grammar-actions tests {{{

subtest({
    my Str $array-of-arrays = '[ [ 1, 2 ], [-3e1_000, +4.56, 5.0] ]';
    my Str $array-of-arrays-newlines = Q:to/EOF/.trim;
    [
        [ [ 1, 2 ], [3, 4, 5] ],
        [
            [ 1, 2 ],
            ["a", "b", "c"]
        ],
        [
            [
                [
                    '''
                    line one
                    line two
                    line three
                    ''',
                    """
                    line four
                    line five
                    line six
                    """
                ],
                [
                    '''
                    line seven
                    line eight
                    line nine
                    ''',
                    """
                    line ten
                    line eleven
                    line twelve
                    """
                ],
            ],
            [
                3,
                6,
                9
            ]
        ]
    ]
    EOF

    my Str $array-of-empty-arrays = Q:to/EOF/.trim;
    [[[[[]]]]]
    EOF

    my Config::TOML::Parser::Actions $actions .= new;
    my $match-array-of-arrays =
        Config::TOML::Parser::Grammar.parse(
            $array-of-arrays,
            :$actions,
            :rule<array>
        );
    my $match-array-of-arrays-newlines =
        Config::TOML::Parser::Grammar.parse(
            $array-of-arrays-newlines,
            :$actions,
            :rule<array>
        );
    my $match-array-of-empty-arrays =
        Config::TOML::Parser::Grammar.parse(
            $array-of-empty-arrays,
            :$actions,
            :rule<array>
        );

    is(
        $match-array-of-arrays.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($array-of-arrays, :rule<array>)] - 94 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal array of arrays
        ┃   Success   ┃    successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-arrays-newlines.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse(
              $array-of-arrays-newlines,
              :rule<array>
           )] - 95 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal array of arrays
        ┃   Success   ┃    (with newlines) successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-empty-arrays.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse(
              $array-of-empty-arrays,
              :rule<array>
           )] - 96 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal array of arrays
        ┃   Success   ┃    (with newlines) successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-array-of-arrays.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 97 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-arrays.made.WHAT ~~ Array
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-arrays-newlines.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 98 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-arrays-newlines.made.WHAT ~~ Array
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-empty-arrays.made.WHAT,
        Array,
        q:to/EOF/
        ♪ [Is array?] - 99 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-empty-arrays.made.WHAT ~~ Array
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-array-of-arrays.made,
        [[1, 2], [-Inf, 4.56, 5.0]],
        q:to/EOF/
        ♪ [Is expected array value?] - 100 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-arrays.made ~~ [ ... ]
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-array-of-arrays-newlines.made,
        [
            [[1, 2], [3, 4, 5]],
            [[1, 2], ["a", "b", "c"]],
            [
                [
                    ["                line one\n                line two\n                line three\n                ", "                line four\n                line five\n                line six\n                "],
                    ["                line seven\n                line eight\n                line nine\n                ", "                line ten\n                line eleven\n                line twelve\n                "]
                ],
                [3, 6, 9]
            ]
        ],
        q:to/EOF/
        ♪ [Is expected array value?] - 101 of 123
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-array-of-arrays-newlines.made ~~ [ ... ]
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━