1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2026-03-20 11:23:41 +01:00
aerc/lib/dirstore_test.go
Robin Jarry bf9f3a4eff treewide: run go modernize
This is the result of the following command:

go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -fix ./...

Signed-off-by: Robin Jarry <robin@jarry.cc>
2025-12-20 18:06:30 +01:00

23 lines
437 B
Go

package lib_test
import (
"reflect"
"testing"
"git.sr.ht/~rjarry/aerc/lib"
"git.sr.ht/~rjarry/aerc/models"
)
func TestDirStore_List(t *testing.T) {
dirs := []string{"a/c", "x", "a/b", "d"}
dirstore := lib.NewDirStore()
for _, d := range dirs {
dirstore.SetMessageStore(&models.Directory{Name: d}, nil)
}
for range 10 {
if !reflect.DeepEqual(dirstore.List(), dirs) {
t.Errorf("order does not match")
return
}
}
}