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

Commit16c3fdd

Browse files
committed
Merge branch 'glob-extension-options' into fix-git-version
2 parentsb86b542 +8f4737a commit16c3fdd

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
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88
##[Unreleased]
9+
##[1.1.9]
10+
###Added
11+
- Issue#63: Added glob options for Glob Extension methods
12+
913
##[1.1.8]
1014
###Fixed
1115
- Issue#59: Cannot enumerate iterator multiple times
@@ -85,7 +89,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8589
- Fix issue that caused unnecessary directory traversal (#20)
8690
- Fix issue where Glob.Directories did not always match properly
8791

88-
[Unreleased]:https://github.com/kthompson/glob/compare/1.1.8...HEAD
92+
[Unreleased]:https://github.com/kthompson/glob/compare/1.1.9...HEAD
93+
[1.1.9]:https://github.com/kthompson/glob/compare/1.1.8...1.1.9
8994
[1.1.8]:https://github.com/kthompson/glob/compare/1.1.7...1.1.8
9095
[1.1.7]:https://github.com/kthompson/glob/compare/1.1.6...1.1.7
9196
[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