thar we GO
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user