grim/gobnc
Clone
Summary
Browse
Changes
Graph
Created a config object and the start of the server
draft
2018-08-08, Gary Kramlich
2ecd482b625d
Created a config object and the start of the server
package
irc
import
(
"testing"
.
"github.com/onsi/gomega"
)
func
TestNickValid
(
t
*
testing
.
T
)
{
g
:=
NewGomegaWithT
(
t
)
tests
:=
map
[
string
]
bool
{
""
:
false
,
"a"
:
true
,
"A"
:
true
,
"*"
:
false
,
"aa"
:
true
,
"Aa"
:
true
,
"aA"
:
true
,
"1a"
:
false
,
"1A"
:
false
,
"a1"
:
true
,
"A1"
:
true
,
"A^"
:
true
,
}
for
nick
,
exp
:=
range
tests
{
g
.
Expect
(
NickValid
(
nick
)).
To
(
Equal
(
exp
))
}
}