Move unread command to cmd/
This commit is contained in:
29
cmd/unread/unread_test.go
Normal file
29
cmd/unread/unread_test.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestIsNewEmail(t *testing.T) {
|
||||
data := []struct {
|
||||
isnew bool
|
||||
path string
|
||||
}{
|
||||
{
|
||||
isnew: true,
|
||||
path: "1377995543.50996_2.sagan.sf.xinu.tv:2,Rb",
|
||||
},
|
||||
{
|
||||
isnew: false,
|
||||
path: "1340520791.M843511P28536.sagan.sf.xinu.tv,S=1467,W=1503:2,RS",
|
||||
},
|
||||
}
|
||||
|
||||
for _, d := range data {
|
||||
got := isNewEmail(d.path)
|
||||
want := d.isnew
|
||||
if got != want {
|
||||
t.Error("Got", got, "want", want, "for", d.path)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user