[thin_shrink] add some more test cases

This commit is contained in:
Joe Thornber
2020-06-30 08:32:04 +01:00
parent 3618da3a12
commit 4d7f9c7ddc
2 changed files with 161 additions and 67 deletions

View File

@@ -20,7 +20,7 @@ where
{
let mut buf = vec![0; len];
file.seek(SeekFrom::Start(src_byte))?;
file.read_exact(&mut buf[0..])?;
file.read_exact(&mut buf)?;
file.seek(SeekFrom::Start(dest_byte))?;
file.write_all(&buf)?;
Ok(())
@@ -55,6 +55,7 @@ pub fn copy(path: &Path, regions: &[Region]) -> Result<()> {
eprintln!("copying {:?}", r);
copy_region(&mut input, r)?;
}
input.flush()?;
Ok(())
}