'Test reading a buffer.'

def testReadBuffer(self):

    path = os.path.join(self.base_path, 'morenumbers.txt')
    p = rdf_paths.PathSpec(path=path, pathtype=rdf_paths.PathSpec.PathType.OS)
    result = self.RunAction(standard.ReadBuffer, rdf_client.BufferReference(pathspec=p, offset=100, length=10))[0]
    self.assertEqual(result.offset, 100)
    self.assertEqual(result.length, 10)
    self.assertEqual(result.data, '7\n38\n39\n40')
