public void FolderDoubles() { var root = new FilePath.Builder(); var x1 = new FilePath.Builder("x"); var x2 = new FilePath.Builder("x"); root.Add(x1); Assert.Equal("\\x", x1.ToWindowsString()); root.Add(x2); Assert.Equal("\\x(1)", x1.ToWindowsString()); Assert.Equal("\\x(2)", x2.ToWindowsString()); }
public void DoublesDirectoryMerge() { var root = new FilePath.Builder(); var x1 = FilePath.Builder.ParseUnix("etc/x"); var x2 = FilePath.Builder.ParseUnix("etc/x"); root.Add(x1.Root()); Assert.Equal("\\etc\\x", x1.ToWindowsString()); root.Add(x2.Root()); Assert.Equal("\\etc\\x(1)", x1.ToWindowsString()); Assert.Equal("\\etc\\x(2)", x2.ToWindowsString()); Assert.True(ReferenceEquals(x1.Parent, x2.Parent)); }
public void DirectoryMerge() { var root = new FilePath.Builder(); var x = FilePath.Builder.ParseUnix("etc/x"); var y = FilePath.Builder.ParseUnix("etc/y"); root.Add(x.Root()); Assert.Equal("\\etc\\x", x.ToWindowsString()); root.Add(y.Root()); Assert.Equal("\\etc\\x", x.ToWindowsString()); Assert.Equal("\\etc\\y", y.ToWindowsString()); Assert.True(ReferenceEquals(x.Parent, y.Parent)); }