public void get_relative_path()
{
fullPath("a", "b", "1.bat").PathRelativeTo(fullPath("a", "b"))
.ShouldBe("1.bat");
fullPath("a", "b", "c", "1.bat").PathRelativeTo(fullPath("a", "b"))
.ShouldBe("c{0}1.bat".ToFormat(Path.DirectorySeparatorChar));
fullPath("a", "b", "c", "d", "1.bat").PathRelativeTo(fullPath("a", "b"))
.ShouldBe("c{0}d{0}1.bat".ToFormat(Path.DirectorySeparatorChar));
fullPath("a", "1.bat").PathRelativeTo(fullPath("a", "b"))
.ShouldBe("..{0}1.bat".ToFormat(Path.DirectorySeparatorChar));
fullPath("a", "1.bat").PathRelativeTo(fullPath("a", "b", "c"))
.ShouldBe("..{0}..{0}1.bat".ToFormat(Path.DirectorySeparatorChar));
fullPath("a", "1.bat").PathRelativeTo(fullPath("a", "b", "c", "d"))
.ShouldBe("..{0}..{0}..{0}1.bat".ToFormat(Path.DirectorySeparatorChar));
fullPath("A", "b", "1.bat").PathRelativeTo(fullPath("A", "b"))
.ShouldBe("1.bat");
fullPath("A", "b").PathRelativeTo(fullPath("A", "b"))
.ShouldBeEmpty();
}