test gorup

This commit is contained in:
Bel LaPointe
2023-10-25 08:17:58 -06:00
parent 0838abf831
commit 40cec44c0b
2 changed files with 34 additions and 0 deletions

13
ledger/group_test.go Normal file
View File

@@ -0,0 +1,13 @@
package ledger
import "testing"
func TestGroup(t *testing.T) {
if got := GroupDate("^20..")(Delta{Date: "2021-01"}); got.Date != "2021" {
t.Error(got)
}
if got := GroupName("^[^:]*")(Delta{Name: "a:b:c"}); got.Name != "a" {
t.Error(got)
}
}