Skip to content

Commit

Permalink
add "april to may" case
Browse files Browse the repository at this point in the history
  • Loading branch information
ijt committed Jan 4, 2023
1 parent 86ee747 commit 618db42
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions v2/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,20 @@ func TestParseRange(t *testing.T) {
wantParsed: "from april to may",
wantErr: false,
},
{
name: "april to may",
args: args{
s: "april to may",
now: time.Date(2022, 1, 1, 0, 0, 0, 0, time.UTC),
dir: Future,
},
wantR: RangeFromTimes(
time.Date(2022, 4, 1, 0, 0, 0, 0, time.UTC),
time.Date(2022, 5, 1, 0, 0, 0, 0, time.UTC),
),
wantParsed: "april to may",
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 618db42

Please sign in to comment.