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"
|
CAP = "CAP"
|
||||||
CTCP = "CTCP"
|
CTCP = "CTCP"
|
||||||
CTCPREPLY = "CTCPREPLY"
|
CTCPREPLY = "CTCPREPLY"
|
||||||
|
ERROR = "ERROR"
|
||||||
INVITE = "INVITE"
|
INVITE = "INVITE"
|
||||||
JOIN = "JOIN"
|
JOIN = "JOIN"
|
||||||
KICK = "KICK"
|
KICK = "KICK"
|
||||||
|
|
|
@ -99,6 +99,18 @@ func TestLineTags(t *testing.T) {
|
||||||
in string
|
in string
|
||||||
out *Line
|
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
|
{ // Make sure non-tagged lines work
|
||||||
":nick!ident@host.com PRIVMSG me :Hello",
|
":nick!ident@host.com PRIVMSG me :Hello",
|
||||||
&Line{
|
&Line{
|
||||||
|
|
Loading…
Reference in New Issue