Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit56100dc

Browse files
committed
Merge branch 'main' into develop
# Conflicts:#ChangeLog.md#build/Build.cs#src/Glob/Glob.csproj
2 parents6caa387 +16c3fdd commit56100dc

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

‎ChangeLog.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2222
- BREAKING: Patterns may no longer include '\' as path separators. Instead, '/' should always be used
2323
and '\' is now available for escaping characters.
2424

25+
##[1.1.9]
26+
###Added
27+
- Issue#63: Added glob options for Glob Extension methods
28+
2529
##[1.1.8]
2630
###Fixed
2731
- Issue#59: Cannot enumerate iterator multiple times
@@ -101,7 +105,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
101105
- Fix issue that caused unnecessary directory traversal (#20)
102106
- Fix issue where Glob.Directories did not always match properly
103107

104-
[Unreleased]:https://github.com/kthompson/glob/compare/1.1.8...HEAD
108+
[Unreleased]:https://github.com/kthompson/glob/compare/1.1.9...HEAD
109+
[1.1.9]:https://github.com/kthompson/glob/compare/1.1.8...1.1.9
105110
[1.1.8]:https://github.com/kthompson/glob/compare/1.1.7...1.1.8
106111
[1.1.7]:https://github.com/kthompson/glob/compare/1.1.6...1.1.7
107112
[1.1.6]:https://github.com/kthompson/glob/compare/1.1.5...1.1.6

‎src/Glob/GlobExtensions.cs‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,31 @@ public static IEnumerable<DirectoryInfo> GlobDirectories(this DirectoryInfo di,
1313
returnGlob.Directories(di,pattern);
1414
}
1515

16+
publicstaticIEnumerable<DirectoryInfo>GlobDirectories(thisDirectoryInfodi,stringpattern,GlobOptionsoptions)
17+
{
18+
returnGlob.Directories(di,pattern,options);
19+
}
20+
1621
publicstaticIEnumerable<FileInfo>GlobFiles(thisDirectoryInfodi,stringpattern)
1722
{
1823
returnGlob.Files(di,pattern);
1924
}
2025

26+
publicstaticIEnumerable<FileInfo>GlobFiles(thisDirectoryInfodi,stringpattern,GlobOptionsoptions)
27+
{
28+
returnGlob.Files(di,pattern,options);
29+
}
30+
31+
2132
publicstaticIEnumerable<FileSystemInfo>GlobFileSystemInfos(thisDirectoryInfodi,stringpattern)
2233
{
2334
returnGlob.FilesAndDirectories(di,pattern);
2435
}
36+
37+
publicstaticIEnumerable<FileSystemInfo>GlobFileSystemInfos(thisDirectoryInfodi,stringpattern,GlobOptionsoptions)
38+
{
39+
returnGlob.FilesAndDirectories(di,pattern,options);
40+
}
41+
2542
}
2643
}

‎test/Glob.Tests/GlobExtensionTests.cs‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ public void CanMatchBinFolderGlob()
1717
Assert.True(allBinFolders.Any(),"There should be some bin folders");
1818
}
1919

20+
[Fact]
21+
publicvoidCanMatchBinFolderGlobCaseInsensitive()
22+
{
23+
varroot=newDirectoryInfo(SourceRoot);
24+
varallBinFolders=root.GlobDirectories("**/BIN",GlobOptions.CaseInsensitive);
25+
26+
Assert.True(allBinFolders.Any(),"There should be some BIN folders");
27+
}
28+
2029
[Fact]
2130
publicvoidCanMatchDllExtension()
2231
{
@@ -26,6 +35,15 @@ public void CanMatchDllExtension()
2635
Assert.True(allDllFiles.Any(),"There should be some DLL files");
2736
}
2837

38+
[Fact]
39+
publicvoidCanMatchDllExtensionCaseInsensitive()
40+
{
41+
varroot=newDirectoryInfo(SourceRoot);
42+
varallDllFiles=root.GlobFiles("**/*.DLL",GlobOptions.CaseInsensitive);
43+
44+
Assert.True(allDllFiles.Any(),"There should be some DLL files");
45+
}
46+
2947
[Fact]
3048
publicvoidCanMatchInfoInFileSystemInfo()
3149
{
@@ -36,6 +54,15 @@ public void CanMatchInfoInFileSystemInfo()
3654
}
3755

3856
[Fact]
57+
publicvoidCanMatchInfoInFileSystemInfoCaseInsensitive()
58+
{
59+
varroot=newDirectoryInfo(SourceRoot);
60+
varallInfoFilesAndFolders=root.GlobFileSystemInfos("**/*INFO",GlobOptions.CaseInsensitive);
61+
62+
Assert.True(allInfoFilesAndFolders.Any(),"There should be some 'allINFOFilesAndFolders'");
63+
}
64+
65+
[Fact]
3966
publicvoidCanMatchConfigFilesInMsDirectory()
4067
{
4168
varglobPattern=@"**/*.sln";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp