Globbing for "/**/foo" fails #3155
Unanswered
tom-dudley
asked this question in
Q&A
Replies: 2 comments
-
It's possible this actually works fine on an actual filesystem, it may be caused by the mock implementation. I've not tested that. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@tom-dudley It's been a while, but following up on this one. It's possible there was a bug either with the I tried reproducing it with the current codebase as of public sealed class ReproCakeBuild_Issue_1610
{
[Fact]
public void Should_Parse_Glob_Expressions_With_Root_Then_Directory_Wildcard_On_Windows()
{
// Given
var fixture = GlobberFixture.Windows();
// When
var result = fixture.Match("/**/*.Test.dll");
// Then
Assert.Equal(2, result.Length);
AssertEx.ContainsFilePath(result, "C:/Working/Project.A.Test.dll");
AssertEx.ContainsFilePath(result, "C:/Working/Project.B.Test.dll");
}
[Fact]
public void Should_Parse_Glob_Expressions_With_Root_Then_Directory_Wildcard_On_UnixLike()
{
// Given
var fixture = GlobberFixture.UnixLike();
// When
var result = fixture.Match("/**/*.Test.dll");
// Then
Assert.Equal(2, result.Length);
AssertEx.ContainsFilePath(result, "/Working/Foo.Bar.Test.dll");
AssertEx.ContainsFilePath(result, "/Working/Bar.Qux.Test.dll");
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm looking at some of the Globbing code and the following new test fails when I don't think it should.
VisitRecursiveWildcardSegment
inGlobVisitor
returns early as theif
block isn't entered due tocontext.Path
being empty. I think that's the cause.What You Are Seeing?
When adding this test, it fails.
What is Expected?
I think this should pass. (I think it identifies an existing bug)
What version of Cake are you using?
Latest on
develop
-55dcb81a9de3a43d36fb0516113aaa175ea58232
Are you running on a 32 or 64 bit system?
64 bit
What environment are you running on? Windows? Linux? Mac?
Windows
Are you running on a CI Server? If so, which one?
Nope
Beta Was this translation helpful? Give feedback.
All reactions