1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-05-21 06:53:21 +00:00

Remove state.StateTracker stutter, hide it in Conn.

This commit is contained in:
Alex Bramley 2013-02-16 11:29:56 +00:00
parent a88b866b63
commit 45d7b3317f
7 changed files with 107 additions and 107 deletions

View file

@ -74,14 +74,14 @@ func Test433(t *testing.T) {
}
// Test the code path that *doesn't* involve state tracking.
c.st = false
c.st = nil
c.h_433(parseLine(":irc.server.org 433 test test :Nickname is already in use."))
s.nc.Expect("NICK test_")
if c.Me.Nick != "test_" {
t.Errorf("My nick not updated from '%s'.", c.Me.Nick)
}
c.st = true
c.st = s.st
}
// Test the handler for NICK messages when state tracking is disabled
@ -90,7 +90,7 @@ func TestNICK(t *testing.T) {
defer s.tearDown()
// State tracking is enabled by default in setUp
c.st = false
c.st = nil
// Call handler with a NICK line changing "our" nick to test1.
c.h_NICK(parseLine(":test!test@somehost.com NICK :test1"))
@ -109,7 +109,7 @@ func TestNICK(t *testing.T) {
}
// Re-enable state tracking and send a line that *should* change nick.
c.st = true
c.st = s.st
c.h_NICK(parseLine(":test1!test@somehost.com NICK :test2"))
// Verify that our Nick hasn't changed (should be handled by h_STNICK).