mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-25 16:08:25 +00:00
Tests to clarify glob patterns
This commit is contained in:
parent
4cf04a3e0d
commit
620eeae4a7
@ -89,7 +89,7 @@ func TestWalkError(t *testing.T) {
|
|||||||
func TestIgnore(t *testing.T) {
|
func TestIgnore(t *testing.T) {
|
||||||
var patterns = map[string][]string{
|
var patterns = map[string][]string{
|
||||||
".": {"t2"},
|
".": {"t2"},
|
||||||
"foo": {"bar", "z*"},
|
"foo": {"bar", "z*", "q[abc]x", "q\\[abc\\]y"},
|
||||||
"foo/baz": {"quux", ".*"},
|
"foo/baz": {"quux", ".*"},
|
||||||
}
|
}
|
||||||
var tests = []struct {
|
var tests = []struct {
|
||||||
@ -110,6 +110,9 @@ func TestIgnore(t *testing.T) {
|
|||||||
{"foo/baz/zquux", true},
|
{"foo/baz/zquux", true},
|
||||||
{"foo/baz/quux", true},
|
{"foo/baz/quux", true},
|
||||||
{"foo/bazz/quux", false},
|
{"foo/bazz/quux", false},
|
||||||
|
{"foo/bazz/q[abc]x", false},
|
||||||
|
{"foo/bazz/qax", true},
|
||||||
|
{"foo/bazz/q[abc]y", true},
|
||||||
}
|
}
|
||||||
|
|
||||||
w := Walker{}
|
w := Walker{}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user