Skip to content

Commit

Permalink
Test with invalid regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiavrammsd committed Dec 3, 2018
1 parent 7859430 commit d09c099
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fastcache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ func TestCacheKeys(t *testing.T) {
t.Fatalf("failed to retrievs keys by pattern: \"%s\"", tt.Pattern)
}
}

result, err := c.Keys("*")
if result != nil {
t.Fatal("expected no matches")
}
if err == nil {
t.Fatal("expected regex error")
}
}

func testCacheGetSet(c *Cache, itemsCount int) error {
Expand Down

0 comments on commit d09c099

Please sign in to comment.