Skip to content

Commit

Permalink
Merge pull request #22 from Atypical-Consulting/fix-test-vfs-tostring
Browse files Browse the repository at this point in the history
Fix a group of broken tests (VFS.ToString method)
  • Loading branch information
phmatray authored Feb 2, 2023
2 parents 02024bc + f610291 commit 66a3549
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Atypical.VirtualFileSystem.Core/VFS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public override string ToString()
sb.AppendLine(node.Path.Name);
}

return sb.ToString().Trim();
return sb.ToString().Trim().ReplaceLineEndings();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,7 @@ public void ToString_returns_3_files_as_ASCII_tree()
├── file1.txt
├── file2.txt
└── file3.txt
"""
.Replace("\r", "");
""".ReplaceLineEndings();

var vfs = new VFS()
.CreateFile("file1.txt")
Expand All @@ -504,8 +503,7 @@ public void ToString_returns_3_directories_as_ASCII_tree()
├── dir1
├── dir2
└── dir3
"""
.Replace("\r", "");
""".ReplaceLineEndings();

var vfs = new VFS()
.CreateDirectory("dir1")
Expand Down Expand Up @@ -537,8 +535,7 @@ public void ToString_returns_3_files_and_3_directories_as_ASCII_tree()
├── file1.txt
├── file2.txt
└── file3.txt
"""
.Replace("\r", "");
""".ReplaceLineEndings();

var vfs = new VFS()
.CreateFile("dir1/file1.txt")
Expand Down Expand Up @@ -588,8 +585,7 @@ public void ToString_returns_a_complex_tree()
├── file1.txt
├── file2.txt
└── file3.txt
"""
.Replace("\r", "");
""".ReplaceLineEndings();

var vfs = new VFS()
.CreateFile("dir1/dir2/dir3/file1.txt")
Expand Down

0 comments on commit 66a3549

Please sign in to comment.