Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
update PathUtil tests to be OS-independent
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmason committed Jan 29, 2013
1 parent 37ab194 commit 3e8623d
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -16,21 +16,21 @@ public void testSubPath1() throws Exception
{
File dir = new File(".");
File file = new File(dir, "sub/myfile.pot");
assertThat(PathUtil.getSubPath(file, dir), is("sub/myfile.pot"));
assertThat(PathUtil.getSubPath(file, dir), is("sub" + File.separator + "myfile.pot"));
}

public void testSubPath2() throws Exception
{
File dir = new File("pot");
File file = new File("pot/sub/myfile.pot");
assertThat(PathUtil.getSubPath(file, dir), is("sub/myfile.pot"));
assertThat(PathUtil.getSubPath(file, dir), is("sub" + File.separator + "myfile.pot"));
}

public void testSubPath3() throws Exception
{
File dir = new File("/tmp/pot");
File file = new File("/tmp/pot/sub/myfile.pot");
assertThat(PathUtil.getSubPath(file, dir), is("sub/myfile.pot"));
assertThat(PathUtil.getSubPath(file, dir), is("sub" + File.separator + "myfile.pot"));
}


Expand Down

0 comments on commit 3e8623d

Please sign in to comment.