Move unread command to cmd/

This commit is contained in:
2014-03-02 21:23:28 -08:00
parent 9becd3e2e7
commit 2ba451df36
2 changed files with 0 additions and 0 deletions

29
cmd/unread/unread_test.go Normal file
View 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)
}
}
}