// Build base dir
getManager().setBaseFile(getReadFolder());
final String path = getReadFolder().getName().getPath();
// §1 Encode "some file"
FileObject file = getManager().resolveFile("%73%6f%6d%65%20%66%69%6c%65");
assertEquals(path + "/some file", file.getName().getPathDecoded());
// §2 Encode "."
file = getManager().resolveFile("%2e");
// 18-6-2005 imario@apache.org: no need to keep the "current directory"
// assertEquals(path + "/.", file.getName().getPathDecoded());
assertEquals(path, file.getName().getPathDecoded());
// §3 Encode '%'
file = getManager().resolveFile("a%25");
assertEquals(path + "/a%", file.getName().getPathDecoded());
// §4 Encode /
file = getManager().resolveFile("dir%2fchild");
assertEquals(path + "/dir/child", file.getName().getPathDecoded());
// §5 Encode \
file = getManager().resolveFile("dir%5cchild");
// 18-6-2005 imario@apache.org: all file separators normalized to "/"
// decided to do this to get the same behaviour as in §4 on windows
// platforms
// assertEquals(path + "/dir\\child", file.getName().getPathDecoded());
assertEquals(path + "/dir/child", file.getName().getPathDecoded());
// §6 Use "%" literal
try
{
getManager().resolveFile("%");