reorganized testing a little
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
blackbeard420 2021-10-27 20:09:03 -04:00
parent d9a617066f
commit cc8e251c90

View File

@ -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())
}