thar we GO

This commit is contained in:
Bel LaPointe
2023-10-25 07:52:05 -06:00
parent f4ca327e86
commit 68fba6b746
3 changed files with 41 additions and 7 deletions

View File

@@ -2,6 +2,21 @@ package ledger
import "testing"
func TestLikeBeforeAfter(t *testing.T) {
if got := LikeBefore("9")(Delta{Date: "2021"}); !got {
t.Error("got 2021 is NOT before 9")
}
if got := LikeBefore("1")(Delta{Date: "2021"}); got {
t.Error("got 2021 IS before 1")
}
if got := LikeAfter("9")(Delta{Date: "2021"}); got {
t.Error("got 2021 IS after 9")
}
if got := LikeAfter("1")(Delta{Date: "2021"}); !got {
t.Error("got 2021 is NOT after 1")
}
}
func TestLikeName(t *testing.T) {
delta := Delta{Name: "x"}
if got := LikeName("^x$")(delta); !got {