irc/irc_test.go

27 lines
483 B
Go
Raw Normal View History

2020-01-22 09:53:44 -05:00
package irc
import (
2020-09-01 22:18:43 -04:00
"fmt"
2020-01-22 09:53:44 -05:00
"log"
"testing"
"time"
)
func TestSimpleIrc(t *testing.T) {
2020-09-03 23:29:52 -04:00
con := NewConnection("thc420.xyz:6667", "irc-go", "irc-go", nil, []string{"#freedom", "#test"})
2020-01-22 09:53:44 -05:00
go con.Run()
time.Sleep(10 * time.Second)
2020-01-22 09:53:44 -05:00
con.SendPrivmsg("#freedom", "\x0356 FUCK YALL BITCHES")
2020-09-01 22:18:43 -04:00
for _, v := range con.userList["#freedom"] {
con.SendPrivmsg("#freedom", fmt.Sprintf("yo %s fuck you", v))
}
2020-01-22 09:53:44 -05:00
}
func TestParser(t *testing.T) {
log.Printf("testing %s\n", t.Name())
}