Fix test suite file writers

next
Sayan Nandan 1 year ago
parent b0ef30853c
commit 24c3b0f8a7
No known key found for this signature in database
GPG Key ID: 42EEDF4AE9D96B54

@ -831,7 +831,7 @@ mod modeset_de {
let e = toml::from_str::<Example>(toml).unwrap_err();
assert_eq!(
e.to_string(),
"Bad value `superuser` for modeset for key `mode` at line 1 column 6"
"TOML parse error at line 1, column 6\n |\n1 | mode=\"superuser\"\n | ^^^^^^^^^^^\nBad value `superuser` for modeset\n"
);
}
}

@ -109,7 +109,11 @@ impl RawFileIOInterface for VirtualFileInterface {
fn fwrite_all(&mut self, bytes: &[u8]) -> super::SDSSResult<()> {
vfs(&self.0, |f| {
assert!(f.write);
f.data_mut().write_all(bytes)?;
if f.data.len() < bytes.len() {
f.data.extend(bytes);
} else {
f.data_mut().write_all(bytes)?;
}
Ok(())
})
}

Loading…
Cancel
Save