Skip to content

Commit

Permalink
Merge pull request #1 from pjf/path_fixes
Browse files Browse the repository at this point in the history
More tests for path utils.
  • Loading branch information
christianvdstap committed Nov 8, 2014
2 parents b593f79 + 84f4e53 commit de2af75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CKAN/Tests/CKAN/KSPPathUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public void NormalizePath()
Assert.AreEqual("/a/b/c", CKAN.KSPPathUtils.NormalizePath("\\a/b\\c"), "Mixed slashes");
Assert.AreEqual("a/b/c", CKAN.KSPPathUtils.NormalizePath("a/b\\c"), "No starting slash");
Assert.AreEqual("/a/b/c", CKAN.KSPPathUtils.NormalizePath("\\a/b\\c\\"), "Trailing slash");
Assert.AreEqual("SPACE", CKAN.KSPPathUtils.NormalizePath("SPACE"), "All upper-case, no slashes");
}

[Test()]
Expand All @@ -25,8 +26,8 @@ public void GetLastPathElement()
Assert.AreEqual("c", CKAN.KSPPathUtils.GetLastPathElement("\\a/b\\c"), "With mixed slashes");
Assert.AreEqual("c", CKAN.KSPPathUtils.GetLastPathElement("a/b\\c"), "No starting slash");
Assert.AreEqual("c", CKAN.KSPPathUtils.GetLastPathElement("\\a/b\\c\\"), "Trailing slash");

Assert.AreEqual("kOS", CKAN.KSPPathUtils.GetLastPathElement("GameData/kOS"), "Real world test");
Assert.AreEqual("buckethead", CKAN.KSPPathUtils.GetLastPathElement("buckethead"), "No slashes at all");
}

[Test()]
Expand Down

0 comments on commit de2af75

Please sign in to comment.