This commit is contained in:
parent
d9a617066f
commit
cc8e251c90
19
irc_test.go
19
irc_test.go
@ -10,14 +10,14 @@ const (
|
||||
channel = "#warez"
|
||||
)
|
||||
|
||||
func TestSimpleIrc(t *testing.T) {
|
||||
func TestJoinChannel(t *testing.T) {
|
||||
con := NewConnection("irc.ouch.chat:6667", "irc-go", "irc-go", nil, []string{channel})
|
||||
|
||||
go con.Run()
|
||||
|
||||
time.Sleep(10 * time.Second)
|
||||
|
||||
time.Sleep(5 * time.Second)
|
||||
log.Printf("%d users in channel %s\n", len(con.userList[channel]), channel)
|
||||
con.SendQuit("scan complete")
|
||||
|
||||
//con.SendPrivmsg("#warez", fmt.Sprintf("\x0356 FUCK YALL BITCHES %d", len(con.userList["#warez"])))
|
||||
|
||||
@ -33,6 +33,19 @@ func TestSimpleIrc(t *testing.T) {
|
||||
*/
|
||||
}
|
||||
|
||||
func TestLusers(t *testing.T) {
|
||||
con := NewConnection("irc.ouch.chat:6667", "irc-go", "irc-go", nil, []string{channel})
|
||||
|
||||
con.NumericCallback = func(from string, i int, args string) {
|
||||
if i == RPL_LUSERCLIENT {
|
||||
log.Printf("luser reply: %s\n", args)
|
||||
con.SendQuit("scan complete")
|
||||
}
|
||||
}
|
||||
|
||||
con.Run()
|
||||
}
|
||||
|
||||
func TestParser(t *testing.T) {
|
||||
log.Printf("testing %s\n", t.Name())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user