test-runner: allow using '/' in filter on Windows, and fix using '\'

Change-Id: I635952a6c04bc305a896143333b2ae141bb6a2b0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53400
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
diff --git a/tools/src/cmd/test-runner/main.go b/tools/src/cmd/test-runner/main.go
index 1c72eac..a60c340 100644
--- a/tools/src/cmd/test-runner/main.go
+++ b/tools/src/cmd/test-runner/main.go
@@ -104,9 +104,14 @@
 		return err
 	}
 
+	// Allow using '/' in the filter on Windows
+	filter = strings.ReplaceAll(filter, "/", string(filepath.Separator));
+
 	// Split the --filter flag up by ',', trimming any whitespace at the start and end
 	globIncludes := strings.Split(filter, ",")
 	for i, s := range globIncludes {
+		// Escape backslashes for the glob config
+		s = strings.ReplaceAll(s, `\`, `\\`)
 		globIncludes[i] = `"` + strings.TrimSpace(s) + `"`
 	}