mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 07:14:40 +03:00
mox!
This commit is contained in:
24
main_test.go
Normal file
24
main_test.go
Normal file
@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/mjl-/mox/mlog"
|
||||
)
|
||||
|
||||
func TestParseDovecotKeywords(t *testing.T) {
|
||||
const data = `0 Old
|
||||
1 Junk
|
||||
2 NonJunk
|
||||
3 $Forwarded
|
||||
4 $Junk
|
||||
`
|
||||
keywords := tryParseDovecotKeywords(strings.NewReader(data), mlog.New("dovecotkeywords"))
|
||||
got := strings.Join(keywords, ",")
|
||||
want := "Old,Junk,NonJunk,$Forwarded,$Junk"
|
||||
if got != want {
|
||||
t.Fatalf("parsing dovecot keywords, got %q, want %q", got, want)
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user