HADOOP-7034. Add TestPath tests to cover dot, dot dot, and slash normalization. Contributed by Eli Collins

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1035142 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eli Collins 2010-11-15 04:57:05 +00:00
parent 946eac3dac
commit 05a497f35a
2 changed files with 5 additions and 2 deletions

View File

@ -171,9 +171,9 @@ Trunk (unreleased changes)
HADOOP-7024. Create a test method for adding file systems during tests.
(Kan Zhang via jghoman)
HADOOP-6903 Make AbstractFSileSystem methods and some FileContext methods to be public
(Sanjay Radia via Sanjay Radia)
HADOOP-6903. Make AbstractFSileSystem methods and some FileContext methods to be public. (Sanjay Radia via Sanjay Radia)
HADOOP-7034. Add TestPath tests to cover dot, dot dot, and slash normalization. (eli)
OPTIMIZATIONS

View File

@ -61,6 +61,9 @@ public class TestPath extends TestCase {
}
public void testNormalize() {
assertEquals("", new Path(".").toString());
assertEquals("..", new Path("..").toString());
assertEquals("/", new Path("/").toString());
assertEquals("/", new Path("//").toString());
assertEquals("/", new Path("///").toString());
assertEquals("//foo/", new Path("//foo/").toString());