We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e3799a commit 12ea3fbCopy full SHA for 12ea3fb
1 file changed
fuzzy_test.go
@@ -107,6 +107,17 @@ func TestFindWithCannedData(t *testing.T) {
107
},
108
109
110
+ // NULs are ignored and don't cause a panic
111
+ {
112
+ "ab", []string{"alphabet\x00\x00\x00\x00bet"}, []fuzzy.Match{
113
114
+ Str: "alphabet\x00\x00\x00\x00bet",
115
+ Index: 0,
116
+ MatchedIndexes: []int{0, 5},
117
+ Score: 4,
118
+ },
119
120
121
}
122
for _, c := range cases {
123
matches := fuzzy.Find(c.pattern, c.data)
0 commit comments