mirror of https://github.com/helix-editor/helix
cargo fmt
parent
7e29ee6dae
commit
511d9d8a52
|
@ -1372,7 +1372,7 @@ mod test {
|
||||||
.to_string();
|
.to_string();
|
||||||
let expectation = std::fs::read_to_string(ref_path).unwrap();
|
let expectation = std::fs::read_to_string(ref_path).unwrap();
|
||||||
assert_eq!(text[..], expectation[..]);
|
assert_eq!(text[..], expectation[..]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
($name:ident, $label:expr) => {
|
($name:ident, $label:expr) => {
|
||||||
decode!($name, $label, $label);
|
decode!($name, $label, $label);
|
||||||
|
@ -1389,11 +1389,11 @@ mod test {
|
||||||
let ref_path = base_path.join(format!("{}_out_ref.txt", $label));
|
let ref_path = base_path.join(format!("{}_out_ref.txt", $label));
|
||||||
assert!(path.exists());
|
assert!(path.exists());
|
||||||
assert!(ref_path.exists());
|
assert!(ref_path.exists());
|
||||||
|
|
||||||
let text = Rope::from_str(&std::fs::read_to_string(path).unwrap());
|
let text = Rope::from_str(&std::fs::read_to_string(path).unwrap());
|
||||||
let mut buf: Vec<u8> = Vec::new();
|
let mut buf: Vec<u8> = Vec::new();
|
||||||
helix_lsp::block_on(to_writer(&mut buf, encoding, &text)).unwrap();
|
helix_lsp::block_on(to_writer(&mut buf, encoding, &text)).unwrap();
|
||||||
|
|
||||||
let expectation = std::fs::read(ref_path).unwrap();
|
let expectation = std::fs::read(ref_path).unwrap();
|
||||||
assert_eq!(buf, expectation);
|
assert_eq!(buf, expectation);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue