Skip to content

Commit 3a1e6d3

Browse files
alvknForNeVeR
authored andcommitted
Added test case for files with no name but with extension, fixed typo
1 parent 73afb27 commit 3a1e6d3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

TruePath.Tests/PathExtensionsTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public void FileNameInvariantTests(string inputPath)
8282
[InlineData(@"\file", ".bar", @"\file.bar")]
8383
[InlineData(@"\file.", ".bar", @"\file.bar")]
8484
[InlineData("file.foo", "bar", "file.bar")]
85+
[InlineData(".gitignore", "hgignore", ".hgignore")]
8586
public void WithExtensionTests_Windows(string inputPath, string newExtension, string expected)
8687
{
8788
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
@@ -105,7 +106,8 @@ public void WithExtensionTests_Windows(string inputPath, string newExtension, st
105106
[InlineData("/file", ".bar", "/file.bar")]
106107
[InlineData("/file.", ".bar", "/file.bar")]
107108
[InlineData("file.foo", "bar", "file.bar")]
108-
public void WithExtensionTests_Unix(string inputPath, string @newExtension, string expected)
109+
[InlineData(".gitignore", "hgignore", ".hgignore")]
110+
public void WithExtensionTests_Unix(string inputPath, string newExtension, string expected)
109111
{
110112
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
111113
{

0 commit comments

Comments
 (0)