Пример #1
0
        public void CombinePath()
        {
            Assert.AreEqual("abc/def", PathList.CombinePath("abc", "def"));
            Assert.AreEqual("abc/def", PathList.CombinePath("abc/", "def"));
            Assert.AreEqual("abc\\def\\ghi", PathList.CombinePath("abc\\def", "ghi"));
            Assert.AreEqual("abc\\def\\ghi\\jkl", PathList.CombinePath("abc\\def", "ghi/jkl"));

            Assert.AreEqual("/abc/def", PathList.CombinePath("a", "/abc", "def"));
            Assert.AreEqual("~/abc/def", PathList.CombinePath("a", "~/abc", "def"));

            Assert.AreEqual("~/", PathList.CombinePath("~/"));
            Assert.AreEqual("\\", PathList.CombinePath("a", "\\"));
        }