diff --git a/nimsuggest/tester.nim b/nimsuggest/tester.nim index c0b5dbc76f..afc8c1294b 100644 --- a/nimsuggest/tester.nim +++ b/nimsuggest/tester.nim @@ -150,7 +150,7 @@ proc runCmd(cmd, dest: string): bool = proc smartCompare(pattern, x: string): bool = let starAt = pattern.find('*') if starAt >= 0: - result = x.startsWith(pattern.substr(0, starAt)) and x.endsWith(pattern.substr(starAt+1)) + result = x.startsWith(pattern.substr(0, starAt-1)) and x.endsWith(pattern.substr(starAt+1)) else: result = x == pattern