MockPath.GetFullPath does not match windows behavior.
Describe the bug
In a special case of a rooted, but not absolute path, MockPath.GetFullPath produces results which differ from what i get using System.IO.Path.GetFullPath
To Reproduce
var fs = new MockFileSystem();
Console.WriteLine("Mocking: " + fs.Path.GetFullPath("d:test.txt"));
Console.WriteLine("OS: " + Path.GetFullPath("d:test.txt"));
Output (Linux):
Mocking: /d:test.txt
OS: /home/USER/d:test.txt
Output (Windows):
Mocking: d:test.txt
OS: D:\test.txt
Expected behavior I expect the values to be equal.
@AnakinRaW :
Are you sure, your test is correct?
The provided input "d:test.txt" is no valid (rooted) path. Maybe it should be @"d:\test.txt" instead?
i'm sure my test is correct. even microsoft documented this case in their code comments: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/IO/Path.cs#L297
Thanks for the clarification, @AnakinRaW ! I was not aware of this format, but after looking around, it is also documented in the File path formats on Windows systems :-)
Wow, what a fancy feature.