Skip to content

Commit

Permalink
fix(assets/pango/filtering): Update tests for empty filter case (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbil authored Nov 6, 2024
1 parent 8f8cfa7 commit 09c17b1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion assets/pango/filtering/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,6 @@ func TestParseReturnsError(t *testing.T) {
"foobar",
"(",
")",
"",
}

for _, s := range checks {
Expand All @@ -942,6 +941,15 @@ func TestParseReturnsError(t *testing.T) {
}
}

func TestParseEmptyString(t *testing.T) {
resp, err := Parse("", `"`)
if err != nil {
t.Fatalf("parse empty string error: %s", err)
} else if resp != nil {
t.Fatalf("parse empty string has non-nil group")
}
}

func TestParseWithInvalidQuoteReturnsError(t *testing.T) {
quotes := []string{
"|",
Expand Down

0 comments on commit 09c17b1

Please sign in to comment.