ianhays
ianhays
Creating files with whitespace names on Linux throws an exception when it should allow the operation. The following lines each throw an exception: ``` File.Create(Path.Combine(TestDirectory, "\n")); //throws File.Create(Path.Combine(TestDirectory, " "));...
Tests for the FileSystem class intermittently fail. The offenders are: | Test Failure | Notes | | --- | --- | | File_WriteAll_all.runTest | | | File_ReadAll_all.runTest | | |...
On Windows, the following test code passes the intended way without issue: ``` string testFileSource = GetTestFilePath(); string testFileDest = GetTestFilePath(); using (StreamWriter sourceStream = new StreamWriter(File.Create(testFileSource))) using (StreamWriter destStream...
Finish rewriting the tests for System.IO.FileSystem and replacing the giant runTest() methods with individual [Fact]s and [Theory]s, replacing every instance of Console.WriteLine along the way.
Labeld in code as "//See VSWhidbey # 92050" On Windows, Directory.GetAccessTime, Directory.GetWriteTime, and Directory.GetCreationTime (as well as their DirectoryInfo clones) will return default values when queried with a path to...
Calling directory.CreateSubdirectory("whitespaces") will return "directory" and create no subdirectory. ``` DirectoryInfo parentDir = new DirectoryInfo(TestDirectory); DirectoryInfo childDir = parentDir.CreateSubdirectory(" "); Assert.Equal(parentDir.FullName + Path.DirectorySeparatorChar, childDir.FullName); ``` If newlines or tabs are...
There's a discrepancy in the way DirectoryInfo.CreateSubdirectory and Directory.CreateDirectory handle trailing tab and newline characters on Windows. The below code exhibits the difference: ``` { // Directory.CreateDirectory curtails trailing tab...
The following code is an example of the situation: ``` string fileName = GetTestFilePath(); using (FileStream fs = new FileInfo(fileName).Open(FileMode.Create)) { fs.WriteByte(0); } using (FileStream fs = new FileInfo(fileName).Open(FileMode.Append)) //...
The File.Move(source, dest) and FileInfo.MoveTo(dest) functions do not currently function as they should with regards to overwrites. The following test passes on Windows, but fails on Linux: ``` FileInfo testFileSource...
There is an inconsistent behavior in File.Move with regards to non existent directories in paths that is present in both the desktop and core frameworks. If the parent directory of...