@@ -37,21 +37,19 @@ var regexpTests = []struct {
37
37
{pat : `/**/foo` , mode : Filenames | NoGlobStar , want : `/[^/]*/foo` },
38
38
{pat : `/**/à` , mode : Filenames , want : `(?s)/(.*/|)à` },
39
39
{
40
- pat : `/**foo` , mode : Filenames , want : `(?s)/. *foo` ,
40
+ pat : `/**foo` , mode : Filenames , want : `/[^/] *foo` ,
41
41
// These all match because without EntireString, we match substrings.
42
42
mustMatch : []string {"/foo" , "/prefix-foo" , "/foo-suffix" , "/sub/foo" },
43
43
},
44
44
{
45
- pat : `/**foo` , mode : Filenames | EntireString , want : `(?s)^/.*foo$` ,
46
- // TODO: /sub/foo should not match; see issue 1149
47
- mustMatch : []string {"/foo" , "/prefix-foo" , "/sub/foo" },
48
- mustNotMatch : []string {"/foo-suffix" },
45
+ pat : `/**foo` , mode : Filenames | EntireString , want : `^/[^/]*foo$` ,
46
+ mustMatch : []string {"/foo" , "/prefix-foo" },
47
+ mustNotMatch : []string {"/foo-suffix" , "/sub/foo" },
49
48
},
50
49
{
51
- pat : `/foo**` , mode : Filenames | EntireString , want : `(?s)^/foo.*$` ,
52
- // TODO: /foo/sub should not match; see issue 1149
53
- mustMatch : []string {"/foo" , "/foo-suffix" , "/foo/sub" },
54
- mustNotMatch : []string {"/prefix-foo" },
50
+ pat : `/foo**` , mode : Filenames | EntireString , want : `^/foo[^/]*$` ,
51
+ mustMatch : []string {"/foo" , "/foo-suffix" },
52
+ mustNotMatch : []string {"/prefix-foo" , "/foo/sub" },
55
53
},
56
54
{pat : `\*` , want : `\*` },
57
55
{pat : `\` , wantErr : true },
0 commit comments