{in:":host.domain.com TEST arg1 arg2",want:":host.domain.com TEST arg1 arg2"},
{in:":host.domain.com TEST :",want:":host.domain.com TEST :"},
{in:":host.domain.com TEST :test1",want:":host.domain.com TEST :test1"},
{in:":host.domain.com TEST arg1 arg2 :test1",want:":host.domain.com TEST arg1 arg2 :test1"},
{in:":nick!user@host TEST :test1",want:":nick!user@host TEST :test1"},
{in:":nick!user@host TEST :test0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000LONG TEXT TRUNCATED HERE",want:":nick!user@host TEST :test0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},
{in:"@aaa=bbb;ccc;example.com/ddd=eee :nick!user@host TEST :test0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000LONG TEXT TRUNCATED HERE",want:"@aaa=bbb;ccc;example.com/ddd=eee :nick!user@host TEST :test0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},
// This will not work for tags as there is no guaranteed order for tags.
// {in: "@aaa=bbb :nick!user@host TEST :test1", want: "@aaa=bbb :nick!user@host TEST :test1"},
// {in: "@aaa=bbb;ccc;example.com/ddd=eee :nick!user@host TEST :test1", want: "@aaa=bbb;ccc;example.com/ddd=eee :nick!user@host TEST :test1"},
}
for_,tt:=rangetests{
got:=ParseEvent(tt.in)
ifgot==nil&&tt.want==""{
continue
}
ifgot==nil{
t.Errorf("ParseEvent: got nil, want: %s",tt.want)
}
ifgot.String()!=tt.want{
ifgot.Tags!=nil{
iflen(got.String())!=len(tt.want){
t.Fatalf("ParseEvent: length exception in tag parse: got %q, want %q",got.String(),tt.want)