mirror of https://github.com/fluffle/goirc
Test ERROR handling and add constant. Fixes #92.
This commit is contained in:
parent
be9257d323
commit
64ad58533d
|
@ -14,6 +14,7 @@ const (
|
|||
CAP = "CAP"
|
||||
CTCP = "CTCP"
|
||||
CTCPREPLY = "CTCPREPLY"
|
||||
ERROR = "ERROR"
|
||||
INVITE = "INVITE"
|
||||
JOIN = "JOIN"
|
||||
KICK = "KICK"
|
||||
|
|
|
@ -99,6 +99,18 @@ func TestLineTags(t *testing.T) {
|
|||
in string
|
||||
out *Line
|
||||
}{
|
||||
{ // Make sure ERROR lines work
|
||||
"ERROR :Closing Link: example.org (Too many user connections (global))",
|
||||
&Line{
|
||||
Nick: "",
|
||||
Ident: "",
|
||||
Host: "",
|
||||
Src: "",
|
||||
Cmd: ERROR,
|
||||
Raw: "ERROR :Closing Link: example.org (Too many user connections (global))",
|
||||
Args: []string{"Closing Link: example.org (Too many user connections (global))"},
|
||||
},
|
||||
},
|
||||
{ // Make sure non-tagged lines work
|
||||
":nick!ident@host.com PRIVMSG me :Hello",
|
||||
&Line{
|
||||
|
|
Loading…
Reference in New Issue