aboutsummaryrefslogtreecommitdiff
path: root/src/io/fs/glob_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/io/fs/glob_test.go')
-rw-r--r--src/io/fs/glob_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/io/fs/glob_test.go b/src/io/fs/glob_test.go
index f0d791fab5..f19bebed77 100644
--- a/src/io/fs/glob_test.go
+++ b/src/io/fs/glob_test.go
@@ -17,6 +17,7 @@ var globTests = []struct {
}{
{os.DirFS("."), "glob.go", "glob.go"},
{os.DirFS("."), "gl?b.go", "glob.go"},
+ {os.DirFS("."), `gl\ob.go`, "glob.go"},
{os.DirFS("."), "*", "glob.go"},
{os.DirFS(".."), "*/glob.go", "fs/glob.go"},
}
@@ -32,7 +33,7 @@ func TestGlob(t *testing.T) {
t.Errorf("Glob(%#q) = %#v want %v", tt.pattern, matches, tt.result)
}
}
- for _, pattern := range []string{"no_match", "../*/no_match"} {
+ for _, pattern := range []string{"no_match", "../*/no_match", `\*`} {
matches, err := Glob(os.DirFS("."), pattern)
if err != nil {
t.Errorf("Glob error for %q: %s", pattern, err)