### ----------------------------------------------------
### -- Config::TOML
### -- Licenses: Unlicense
### -- Authors: 
### -- File: t/grammar-actions/01-primitives.rakutest
### ----------------------------------------------------
### -- Chunk 1 of 3
use Test;
use Config::TOML::Parser::Actions;
use Config::TOML::Parser::Grammar;

plan 7;

# string grammar-actions tests {{{
# --- basic string equivalency tests {{{

subtest({
    # The following strings are byte-for-byte equivalent:
    my Str $str1 = Q:to/EOF/.trim;
    "The quick brown fox jumps over the lazy dog."
    EOF

    my Str $str2 = Q:to/EOF/.trim;
    """
    The quick brown \


      fox jumps over \
        the lazy dog."""
    EOF

    my Str $str3 = Q:to/EOF/.trim;
    """\
           The quick brown \
           fox jumps over \
           the lazy dog.\
           """
    EOF

    my Config::TOML::Parser::Actions $actions .= new;
    my $match-str1 =
        Config::TOML::Parser::Grammar.parse(
            $str1,
            :$actions,
            :rule<string>
        );
    my $match-str2 =
        Config::TOML::Parser::Grammar.parse(
            $str2,
            :$actions,
            :rule<string>
        );
    my $match-str3 =
        Config::TOML::Parser::Grammar.parse(
            $str3,
            :$actions,
            :rule<string>
        );

    is(
        $match-str1.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($str1, :rule<string>)] - 1 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal basic string successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-str2.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($str2, :rule<string>)] - 2 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal basic multiline string
        ┃   Success   ┃    successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-str3.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($str3, :rule<string>)] - 3 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal basic multiline string
        ┃   Success   ┃    successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-str1.made ~~ $match-str2.made,
        True,
        q:to/EOF/
        ♪ [Byte-for-byte string equivalency] - 4 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-str1.made ~~ $match-str2.made
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-str1.made ~~ $match-str3.made,
        True,
        q:to/EOF/
        ♪ [Byte-for-byte string equivalency] - 5 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-str1.made ~~ $match-str3.made
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-str2.made ~~ $match-str3.made,
        True,
        q:to/EOF/
        ♪ [Byte-for-byte string equivalency] - 6 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-str2.made ~~ $match-str3.made
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
});

# --- end basic string equivalency tests }}}
# --- literal string equivalency tests {{{

subtest({
    my Str $str4 = Q:to/EOF/.trim;
    '''
    The first newline is
    trimmed in raw strings.
       All other whitespace
       is preserved.
    '''
    EOF

    my Str $str5 = Q:to/EOF/.trim;
    '''The first newline is
    trimmed in raw strings.
       All other whitespace
       is preserved.
    '''
    EOF

    my Config::TOML::Parser::Actions $actions .= new;
    my $match-str4 =
        Config::TOML::Parser::Grammar.parse(
            $str4,
            :$actions,
            :rule<string>
        );
    my $match-str5 =
        Config::TOML::Parser::Grammar.parse(
            $str5,
            :$actions,
            :rule<string>
        );

    is(
        $match-str4.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($str4, :rule<string>)] - 7 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal literal string
        ┃   Success   ┃    successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-str5.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($str5, :rule<string>)] - 8 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal literal multiline string
        ┃   Success   ┃    successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-str4.made ~~ $match-str5.made,
        True,
        q:to/EOF/
        ♪ [Byte-for-byte string equivalency] - 9 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-str4.made ~~ $match-str5.made
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
});

# --- end literal string equivalency tests }}}
# --- base64 tests {{{

subtest({
    # t/data/openssl.pem
    my Str $openssl-pem-raku = slurp('t/data/openssl.pem').trim;
    my Str $openssl-pem-toml = Q:to/EOF/.trim;
    '''
    -----BEGIN RSA PRIVATE KEY-----
    MIIEpQIBAAKCAQEA58VK2N1YSSMWtAVSHQJRYrITij3LVbsZkcavx0ljZe8N0QeA
    I13mTeq+WC1+5Nhcxd2AG1dFXaDJ7HhvMd9HWj04IoOmWcnaTN3OWwu03blp11+R
    cHDqvOmq/2O5JEe3/XGLHnqkYw48X1+3VB7cEoxVgHVOT0yn92s4YTkM7feaqJjZ
    5osAI+wHgWK6RY4FQVZZ9BTe1aKd3Gf+mpsXvKgqI3w2wucqgS6/jpONxLL7N+/t
    BAHUbirC0HBqvDtIgev3Ali9I+JK/XO0uaUdXLxpfxlPs3biBFcgrvIMShttcGSq
    aAcPsGuv23zgBvDd5avGeV/5yYdvj1iFZuq/HwIDAQABAoIBAQCcTVQlnlhcslos
    O25d++Mw4REGaJgJD+21fr2qcxaidq3lqt5Ce5/GKioFw2DRKgyer7smNRulgbrL
    S4kJpB81fxWtSQVVhig/MFJq2iE2akUzptKpdq0Hi7nzE6iXC/rL49fDTUgxOTeD
    xkQXadxWcedzgyi1l+eqltdl0ZijndAz6dNb0aoFXww2Qks0V/PR7Q7/o72wVWwN
    l9yxK7ax8qd0xtu5MNAASGqe7UY+RJHSLs4rvhqaNqtDNb7Ejn8JOmNgUS48cWuj
    +oNmkUul2EkkJcbIVJd4r26zobGvlSw0Mh3YnlCvWkV+0rgDYaQRpJ7IPs4boOPW
    a8eeu7ORAoGBAPq9SP2+viSsdX1nhi5yjJnAwgsyLq5x5KnqRGdy4rqM57pXeZ4+
    5oXoz/7v8p1xAHTrMw/UT1HMfGt7KwLV5qaX9Ryv3HwoH9gHJbhLNPNqcjq6qhDa
    1UegYIrXcKwsVCbLwIbq5OnVnoV6By4PChEDP0JH8rz0SSBYOlL5uwJXAoGBAOyi
    IHFsfAzxnwSiXss1/oFnSQgyr/XIgNkmnIrjEW6j+higesU7RCIT8gDmaCURaXXu
    qwKfzf+QDza3t1PzEPPRYqMkI2u0FR2VAuedFD7Tob0HObbEr7bSsbaXP+pYwv8o
    qvYu8WGUmvz5hze6ab46er1biG+ccdKvms+o7/x5AoGBAJhMZsxxkk72TbrpKbCG
    tW4ijfp89avR1CF9ASWQu7SyJ4Kg5WdAL4dA3S2tk0EcRTm/Ltm7jJ5TxXMHch2b
    zSh9fk15aEQlnwn5dWjWjYgYrN+NSAVK1mdWO625pF9/4XFbK0sH3BlIPqw2bawF
    SIkC3uakiwVIoC48SNjjhTqrAoGAX9PYJ5azNdqzdwD6OnkHNAhLvxInx/UGmOnW
    AzipWpD1OvviO/UgRlylaE/mZPyEJMoeXtWwaopAXvxPNaP9fX+R3ldIMNmgo3Yw
    0vL9u+OgYBiI+sb0EamJZlQiAhkn/oTNlxyzi7zOdxvl8l9/axXrlrt2qRxFy/hp
    TScw6KECgYEArnBka86pT7O7IPNid+XYfPhY7DQY11+80Qf06lZtGS7gxptno0B1
    nn5dnEBQFyGbAFivXdEwBZqKzwFeRj94++dPtEeytxPoMHn/FCfrtpcU5K+D8xuU
    8kC2NCdXD7B2vJSC8KYh1QLDCB99wQOprti9JsgGWAQB369zNZmXxkk=
    -----END RSA PRIVATE KEY-----'''
    EOF

    # t/data/ssh-ed25519
    my Str $ssh-ed25519-raku = slurp('t/data/ssh-ed25519').trim;
    my Str $ssh-ed25519-toml = Q:to/EOF/.trim;
    '''
    -----BEGIN OPENSSH PRIVATE KEY-----
    b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
    QyNTUxOQAAACDGRb34PwO5METgCnk5YZJMIWICmiajU50EYFfiItMT2gAAAJBJr2mhSa9p
    oQAAAAtzc2gtZWQyNTUxOQAAACDGRb34PwO5METgCnk5YZJMIWICmiajU50EYFfiItMT2g
    AAAEAU/lzbG5m1GrVut3mGx3/NbU7KnJWvB/1eKSXyg7jCh8ZFvfg/A7kwROAKeTlhkkwh
    YgKaJqNTnQRgV+Ii0xPaAAAACmhlbGxvQHRvbWwBAgM=
    -----END OPENSSH PRIVATE KEY-----'''
    EOF

    # t/data/ssh-ed25519.pub
    my Str $ssh-ed25519-pub-raku = slurp('t/data/ssh-ed25519.pub').trim;
    my Str $ssh-ed25519-pub-toml = Q:to/EOF/.trim;
    '''
    ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMZFvfg/A7kwROAKeTlhkkwhYgKaJqNTnQRgV+Ii0xPa hello@toml'''
    EOF

    my Config::TOML::Parser::Actions $actions .= new;
    my $match-openssl-pem-toml =
        Config::TOML::Parser::Grammar.parse(
            $openssl-pem-toml,
            :$actions,
            :rule<string>
        );
    my $match-ssh-ed25519-toml =
        Config::TOML::Parser::Grammar.parse(
            $ssh-ed25519-toml,
            :$actions,
            :rule<string>
        );
    my $match-ssh-ed25519-pub-toml =
        Config::TOML::Parser::Grammar.parse(
            $ssh-ed25519-pub-toml,
            :$actions,
            :rule<string>
        );

    is(
        $match-openssl-pem-toml.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($openssl-pem-toml, :rule<string>)] - 10 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal literal multiline string
        ┃   Success   ┃    (openssl.pem) successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-ssh-ed25519-toml.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($ssh-ed25519-toml, :rule<string>)] - 11 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal literal multiline string
        ┃   Success   ┃    (ssh-ed25519) successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-ssh-ed25519-pub-toml.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($ssh-ed25519-pub-toml, :rule<string>)] - 12 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal literal multiline string
        ┃   Success   ┃    (ssh-ed25519.pub) successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $openssl-pem-raku ~~ $match-openssl-pem-toml.made,
        True,
        q:to/EOF/
        ♪ [Byte-for-byte string equivalency] - 13 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $openssl-pem-raku ~~ $match-openssl-pem-toml.made
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $ssh-ed25519-raku ~~ $match-ssh-ed25519-toml.made,
        True,
        q:to/EOF/
        ♪ [Byte-for-byte string equivalency] - 14 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $ssh-ed25519-raku ~~ $match-ssh-ed25519-toml.made
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $ssh-ed25519-pub-raku ~~ $match-ssh-ed25519-pub-toml.made,
        True,
        q:to/EOF/
        ♪ [Byte-for-byte string equivalency] - 15 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $ssh-ed25519-pub-raku ~~
        ┃   Success   ┃        $match-ssh-ed25519-pub-toml.made
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
});

# --- end base64 tests }}}
# end string grammar-actions tests }}}
# number grammar-actions tests {{{
# --- integer tests {{{

subtest({
    # Integers are whole numbers. Positive numbers may be prefixed with
    # a plus sign. Negative numbers are prefixed with a minus sign.
    my Str $integer1 = Q{+99};
    my Str $integer2 = Q{42};
    my Str $integer3 = Q{0};
    my Str $integer4 = Q{-17};
    my Str $integer5 = Q{1_000};

    # For large numbers, you may use underscores to enhance
    # readability. Each underscore must be surrounded by at least one digit.
    my Str $integer6 = Q{5_349_221};
    my Str $integer7 = Q{1_2_3_4_5};

    # 64 bit (signed long) range expected (−9,223,372,036,854,775,808
    # to 9,223,372,036,854,775,807).
    my Str $integer8 = Q{-9223372036854775808};
    my Str $integer9 = Q{9223372036854775807};

    # Non-negative integer values may also be expressed in hexadecimal,
    # octal, or binary. In these formats, leading zeros are allowed (after
    # the prefix). Hex values are case insensitive. Underscores are
    # allowed between digits (but not between the prefix and the value).
    my Str $integer-bin = Q{0b11010110};
    my Str $integer-bin-underscore = Q{0b1_1_01_01_10};
    my Str $integer-hex = Q{0xdEaDbEEf};
    my Str $integer-hex-underscore = Q{0xdead_beef};
    my Str $integer-oct = Q{0o01234567};
    my Str $integer-oct-underscore = Q{0o0_1_2_3_4_5_6_7};

    my Config::TOML::Parser::Actions $actions .= new;
    my $match-integer1 =
        Config::TOML::Parser::Grammar.parse(
            $integer1,
            :$actions,
            :rule<number>
        );
    my $match-integer2 =
        Config::TOML::Parser::Grammar.parse(
            $integer2,
            :$actions,
            :rule<number>
        );
    my $match-integer3 =
        Config::TOML::Parser::Grammar.parse(
            $integer3,
            :$actions,
            :rule<number>
        );
    my $match-integer4 =
        Config::TOML::Parser::Grammar.parse(
            $integer4,
            :$actions,
            :rule<number>
        );
    my $match-integer5 =
        Config::TOML::Parser::Grammar.parse(
            $integer5,
            :$actions,
            :rule<number>
        );
    my $match-integer6 =
        Config::TOML::Parser::Grammar.parse(
            $integer6,
            :$actions,
            :rule<number>
        );
    my $match-integer7 =
        Config::TOML::Parser::Grammar.parse(
            $integer7,
            :$actions,
            :rule<number>
        );
    my $match-integer8 =
        Config::TOML::Parser::Grammar.parse(
            $integer8,
            :$actions,
            :rule<number>
        );
    my $match-integer9 =
        Config::TOML::Parser::Grammar.parse(
            $integer9,
            :$actions,
            :rule<number>
        );
    my $match-integer-bin =
        Config::TOML::Parser::Grammar.parse(
            $integer-bin,
            :$actions,
            :rule<number>
        );
    my $match-integer-bin-underscore =
        Config::TOML::Parser::Grammar.parse(
            $integer-bin-underscore,
            :$actions,
            :rule<number>
        );
    my $match-integer-hex =
        Config::TOML::Parser::Grammar.parse(
            $integer-hex,
            :$actions,
            :rule<number>
        );
    my $match-integer-hex-underscore =
        Config::TOML::Parser::Grammar.parse(
            $integer-hex-underscore,
            :$actions,
            :rule<number>
        );
    my $match-integer-oct =
        Config::TOML::Parser::Grammar.parse(
            $integer-oct,
            :$actions,
            :rule<number>
        );
    my $match-integer-oct-underscore =
        Config::TOML::Parser::Grammar.parse(
            $integer-oct-underscore,
            :$actions,
            :rule<number>
        );

    is(
        $match-integer1.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer1, :rule<number>)] - 16 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer2.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer2, :rule<number>)] - 17 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer3.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer3, :rule<number>)] - 18 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer4.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer4, :rule<number>)] - 19 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer5.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer5, :rule<number>)] - 20 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer6.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer6, :rule<number>)] - 21 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer7.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer7, :rule<number>)] - 22 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer8.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer8, :rule<number>)] - 23 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer9.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer9, :rule<number>)] - 24 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer-bin.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer-bin, :rule<number>)] - 25 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal binary integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer-bin-underscore.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer-bin-underscore, :rule<number>)] - 26 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal binary integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer-hex.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer-hex, :rule<number>)] - 27 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal hexadecimal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer-hex-underscore.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer-hex-underscore, :rule<number>)] - 28 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal hexadecimal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer-oct.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer-oct, :rule<number>)] - 29 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal octal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer-oct-underscore.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($integer-oct-underscore, :rule<number>)] - 30 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal octal integer successfully
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );

    is(
        $match-integer1.made.WHAT,
        Int,
        q:to/EOF/
        ♪ [Is integer?] - 31 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-integer1.made.WHAT ~~ Int
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer2.made.WHAT,
        Int,
        q:to/EOF/
        ♪ [Is integer?] - 32 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-integer2.made.WHAT ~~ Int
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer3.made.WHAT,
        Int,
        q:to/EOF/
        ♪ [Is integer?] - 33 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-integer3.made.WHAT ~~ Int
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer4.made.WHAT,
        Int,
        q:to/EOF/
        ♪ [Is integer?] - 34 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-integer4.made.WHAT ~~ Int
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer5.made.WHAT,
        Int,
        q:to/EOF/
        ♪ [Is integer?] - 35 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-integer5.made.WHAT ~~ Int
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer6.made.WHAT,
        Int,
        q:to/EOF/
        ♪ [Is integer?] - 36 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-integer6.made.WHAT ~~ Int
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer7.made.WHAT,
        Int,
        q:to/EOF/
        ♪ [Is integer?] - 37 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-integer7.made.WHAT ~~ Int
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer8.made.WHAT,
        Int,
        q:to/EOF/
        ♪ [Is integer?] - 38 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-integer8.made.WHAT ~~ Int
        ┃   Success   ┃
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-integer9.made.WHAT,
        Int,
        q:to/EOF/
        ♪ [Is integer?] - 39 of 142
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ $match-integer9.made.WHAT ~~ Int
        ┃   Success   ┃
        ┃