Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ircbot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clubstatus
ircbot
Commits
78169199
Commit
78169199
authored
6 years ago
by
farhaven
Browse files
Options
Downloads
Patches
Plain Diff
More test coverage
parent
e9fe67fc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
commands_test.go
+31
-0
31 additions, 0 deletions
commands_test.go
messages_test.go
+0
-0
0 additions, 0 deletions
messages_test.go
with
31 additions
and
0 deletions
commands_test.go
0 → 100644
+
31
−
0
View file @
78169199
package
main
import
(
"strings"
"testing"
)
func
TestSimpleHelp
(
t
*
testing
.
T
)
{
h
:=
getHelp
()
if
!
strings
.
Contains
(
h
,
owner
)
{
t
.
Errorf
(
`Simple help does not contain bot owner!`
)
}
}
func
TestFullHelp
(
t
*
testing
.
T
)
{
h
:=
getFullHelp
()
if
len
(
h
)
!=
5
{
t
.
Log
(
`unexpected number of output lines:`
,
len
(
h
))
t
.
FailNow
()
}
if
!
strings
.
Contains
(
h
[
3
],
version
)
{
t
.
Errorf
(
`full help does not contain version!`
)
}
if
!
strings
.
Contains
(
h
[
4
],
owner
)
{
t
.
Errorf
(
`Simple help does not contain bot owner!`
)
}
}
This diff is collapsed.
Click to expand it.
ircbot
_test.go
→
messages
_test.go
+
0
−
0
View file @
78169199
File moved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment