'Test that we can guess a pathspec from a partial pathspec.'

def testGuessPathSpecPartial(self):

    path = os.path.join(self.base_path, 'test_img.dd')
    pathspec = rdf_paths.PathSpec(path=path, pathtype=rdf_paths.PathSpec.PathType.OS)
    pathspec.nested_path.path = '/home/image2.img/home/a.txt'
    pathspec.nested_path.pathtype = rdf_paths.PathSpec.PathType.TSK
    fd = vfs.VFSOpen(pathspec)
    self.assertEqual(fd.read(3), 'yay')
    pathspec.nested_path.path = '/home/image2.img/home/'
    fd = vfs.VFSOpen(pathspec)
    names = []
    for s in fd.ListFiles():
        self.assertEqual(s.pathspec.nested_path.path, '/home/image2.img')
        names.append(s.pathspec.nested_path.nested_path.path)
    self.assertTrue(('home/a.txt' in names))
