public void TestGetDirectoryUnix() { var p = new MyPath("/"); Assert.AreEqual("/", p.GetDirectory().PathStr); p = new MyPath("/fallback"); Assert.AreEqual("/", p.GetDirectory().PathStr); p = new MyPath("/fallback/////"); Assert.AreEqual("/", p.GetDirectory().PathStr); p = new MyPath("/fall//back//"); Assert.AreEqual("/fall", p.GetDirectory().PathStr); }