gobwas / glob

Go glob
MIT License
948 stars 63 forks source link

Fails to match with non-ASCII rune at end of segment #54

Open calmh opened 2 years ago

calmh commented 2 years ago

When there's a non-ASCII rune adjacent to a wildcard or at the end of a pattern, the matcher fails. Adding these test cases, the marked ones fail:

        glob(true, "155ö", "155ö"),
        glob(true, "1?5ö", "155ö"), // <-
        glob(true, "1?ö5", "15ö5"),
        glob(true, "155helloö", "155helloö"),
        glob(true, "1?5helloö", "155helloö"), // <-
        glob(true, "1?ö5hello", "15ö5hello"),
        glob(true, "1?5heöllo", "155heöllo"),
        glob(true, "1ö?5", "1ö55"), // <-
        glob(true, "ö1?5", "ö155"),