Skip to content

Commit

Permalink
fix windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatcuk committed Oct 31, 2022
1 parent cd84160 commit db6d260
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions doublestar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ var matchTests = []MatchTest{
{"a*", "a", true, nil, false, true, true, 9, 9},
{"a*", "abc", true, nil, false, true, true, 9, 9},
{"a*", "ab/c", false, nil, false, true, true, 9, 9},
{"a*/b", "abc/b", true, nil, true, true, true, 2, 2},
{"a*/b", "a/c/b", false, nil, true, true, true, 2, 2},
{"a*/b", "abc/b", true, nil, !onWindows, true, true, 2, 2},
{"a*/b", "a/c/b", false, nil, !onWindows, true, true, 2, 2},
{"a*b*c*d*e*", "axbxcxdxe", true, nil, false, true, true, 3, 3},
{"a*b*c*d*e*/f", "axbxcxdxe/f", true, nil, true, true, true, 2, 2},
{"a*b*c*d*e*/f", "axbxcxdxexxx/f", true, nil, true, true, true, 2, 2},
{"a*b*c*d*e*/f", "axbxcxdxe/xxx/f", false, nil, true, true, true, 2, 2},
{"a*b*c*d*e*/f", "axbxcxdxexxx/fff", false, nil, true, true, true, 2, 2},
{"a*b*c*d*e*/f", "axbxcxdxe/f", true, nil, !onWindows, true, true, 2, 2},
{"a*b*c*d*e*/f", "axbxcxdxexxx/f", true, nil, !onWindows, true, true, 2, 2},
{"a*b*c*d*e*/f", "axbxcxdxe/xxx/f", false, nil, !onWindows, true, true, 2, 2},
{"a*b*c*d*e*/f", "axbxcxdxexxx/fff", false, nil, !onWindows, true, true, 2, 2},
{"a*b?c*x", "abxbbxdbxebxczzx", true, nil, false, true, true, 2, 2},
{"a*b?c*x", "abxbbxdbxebxczzy", false, nil, false, true, true, 2, 2},
{"ab[c]", "abc", true, nil, false, true, true, 1, 1},
Expand Down Expand Up @@ -99,12 +99,12 @@ var matchTests = []MatchTest{
{"a/**", "a/", true, nil, false, false, false, 7, 7},
{"a/**", "a/b", true, nil, false, false, true, 7, 7},
{"a/**", "a/b/c", true, nil, false, false, true, 7, 7},
{"**/c", "c", true, nil, true, false, true, 5, 4},
{"**/c", "b/c", true, nil, true, false, true, 5, 4},
{"**/c", "a/b/c", true, nil, true, false, true, 5, 4},
{"**/c", "a/b", false, nil, true, false, true, 5, 4},
{"**/c", "abcd", false, nil, true, false, true, 5, 4},
{"**/c", "a/abc", false, nil, true, false, true, 5, 4},
{"**/c", "c", true, nil, !onWindows, false, true, 5, 4},
{"**/c", "b/c", true, nil, !onWindows, false, true, 5, 4},
{"**/c", "a/b/c", true, nil, !onWindows, false, true, 5, 4},
{"**/c", "a/b", false, nil, !onWindows, false, true, 5, 4},
{"**/c", "abcd", false, nil, !onWindows, false, true, 5, 4},
{"**/c", "a/abc", false, nil, !onWindows, false, true, 5, 4},
{"a/**/b", "a/b", true, nil, false, false, true, 2, 2},
{"a/**/c", "a/b/c", true, nil, false, false, true, 2, 2},
{"a/**/d", "a/b/c/d", true, nil, false, false, true, 1, 1},
Expand All @@ -131,10 +131,10 @@ var matchTests = []MatchTest{
{"{a/abc}", "a/abc", true, nil, false, false, true, 1, 1},
{"{a/b,a/c}", "a/c", true, nil, false, false, true, 2, 2},
{"abc/**", "abc/b", true, nil, false, false, true, 3, 3},
{"**/abc", "abc", true, nil, true, false, true, 2, 2},
{"**/abc", "abc", true, nil, !onWindows, false, true, 2, 2},
{"abc**", "abc/b", false, nil, false, false, true, 3, 3},
{"**/*.txt", "abc/【test】.txt", true, nil, true, false, true, 1, 1},
{"**/【*", "abc/【test】.txt", true, nil, true, false, true, 1, 1},
{"**/*.txt", "abc/【test】.txt", true, nil, !onWindows, false, true, 1, 1},
{"**/【*", "abc/【test】.txt", true, nil, !onWindows, false, true, 1, 1},
{"**/{a,b}", "a/b", true, nil, true, false, true, 5, 5},
// unfortunately, io/fs can't handle this, so neither can Glob =(
{"broken-symlink", "broken-symlink", true, nil, false, true, false, 1, 1},
Expand Down

0 comments on commit db6d260

Please sign in to comment.