Skip to content

Non spec compliant unit test #115

Open
@RAnders00

Description

"Input": ":src AWAY ",
"Expected": {
"source": {
"host": "src"
},
"command": "AWAY",
"params": [
""
]
}
},

In this test, the expected output for the parameters is [""] (single element list, holding an empty string).

I think the IRC spec disagrees on this: https://tools.ietf.org/html/rfc2812#section-2.3.1
relevant part:

    params     =  *14( SPACE middle ) [ SPACE ":" trailing ]
    middle     =  nospcrlfcl *( ":" / nospcrlfcl )
    nospcrlfcl =  %x01-09 / %x0B-0C / %x0E-1F / %x21-39 / %x3B-FF
                    ; any octet except NUL, CR, LF, " " and ":"

So in essence the space between "middle" parameters is "used up" by the SPACE in the definition of params, and then middle first expects something that is not a space. From my understanding this means that multiple spaces are not allowed between middle parameters, and the IRC test under question should be an error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions