Lint + version bump
This commit is contained in:
parent
00308d0ce6
commit
98424443a8
@ -78,17 +78,16 @@ func TestState(t *testing.T) {
|
|||||||
if network := c.NetworkName(); network != "DummyIRC" && network != "DUMMY" {
|
if network := c.NetworkName(); network != "DummyIRC" && network != "DUMMY" {
|
||||||
t.Errorf("User.Network == %q, want \"DummyIRC\" or \"DUMMY\"", network)
|
t.Errorf("User.Network == %q, want \"DummyIRC\" or \"DUMMY\"", network)
|
||||||
return
|
return
|
||||||
} else {
|
|
||||||
t.Logf("successfully tested network name: %s", network)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.Logf("successfully tested network name: %s", network)
|
||||||
|
|
||||||
if caseExample, ok := c.GetServerOpt("NICKLEN"); !ok || caseExample != "20" {
|
if caseExample, ok := c.GetServerOpt("NICKLEN"); !ok || caseExample != "20" {
|
||||||
t.Errorf("Client.GetServerOptions returned invalid ISUPPORT variable: %q", caseExample)
|
t.Errorf("Client.GetServerOptions returned invalid ISUPPORT variable: %q", caseExample)
|
||||||
return
|
|
||||||
} else {
|
|
||||||
t.Logf("successfully serveroption NICKLEN: %s", caseExample)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.Logf("successfully serveroption NICKLEN: %s", caseExample)
|
||||||
|
|
||||||
users := c.UserList()
|
users := c.UserList()
|
||||||
channels := c.ChannelList()
|
channels := c.ChannelList()
|
||||||
|
|
||||||
@ -96,26 +95,26 @@ func TestState(t *testing.T) {
|
|||||||
// This could fail too, if sorting isn't occurring.
|
// This could fail too, if sorting isn't occurring.
|
||||||
t.Errorf("got state users %#v, wanted: %#v", users, []string{"fhjones", "nick2"})
|
t.Errorf("got state users %#v, wanted: %#v", users, []string{"fhjones", "nick2"})
|
||||||
return
|
return
|
||||||
} else {
|
|
||||||
t.Logf("successfully checked userlist: %v", users)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.Logf("successfully checked userlist: %v", users)
|
||||||
|
|
||||||
if !reflect.DeepEqual(channels, []string{"#channel", "#channel2"}) {
|
if !reflect.DeepEqual(channels, []string{"#channel", "#channel2"}) {
|
||||||
// This could fail too, if sorting isn't occurring.
|
// This could fail too, if sorting isn't occurring.
|
||||||
t.Errorf("got state channels %#v, wanted: %#v", channels, []string{"#channel", "#channel2"})
|
t.Errorf("got state channels %#v, wanted: %#v", channels, []string{"#channel", "#channel2"})
|
||||||
return
|
return
|
||||||
} else {
|
|
||||||
t.Logf("successfully checked channel list: %v", channels)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.Logf("successfully checked channel list: %v", channels)
|
||||||
|
|
||||||
fullChannels := c.Channels()
|
fullChannels := c.Channels()
|
||||||
for i := 0; i < len(fullChannels); i++ {
|
for i := 0; i < len(fullChannels); i++ {
|
||||||
if fullChannels[i].Name != channels[i] {
|
if fullChannels[i].Name != channels[i] {
|
||||||
t.Errorf("fullChannels name doesn't map to same name in ChannelsList: %q :: %#v", fullChannels[i].Name, channels)
|
t.Errorf("fullChannels name doesn't map to same name in ChannelsList: %q :: %#v", fullChannels[i].Name, channels)
|
||||||
return
|
return
|
||||||
} else {
|
|
||||||
t.Logf("successfully checked full channel list: %s: %v", fullChannels[i].Name, channels)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.Logf("successfully checked full channel list: %s: %v", fullChannels[i].Name, channels)
|
||||||
}
|
}
|
||||||
|
|
||||||
fullUsers := c.Users()
|
fullUsers := c.Users()
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
package girc
|
package girc
|
||||||
|
|
||||||
const Version = "v0.5.1"
|
// Version represents the current library version of girc-atomic.
|
||||||
|
const Version = "v0.5.2"
|
||||||
|
Loading…
Reference in New Issue
Block a user