mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-30 09:05:54 +00:00
Fix tests
This commit is contained in:
1 parent
f71ad1e00d
commit
f9cb2bc872
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -16,5 +16,5 @@ fn main() {
|
|||||||
let border_style = BorderStyle::Unicode;
|
let border_style = BorderStyle::Unicode;
|
||||||
|
|
||||||
let mut printer = Printer::new(&mut handle, show_color, border_style, use_squeezing);
|
let mut printer = Printer::new(&mut handle, show_color, border_style, use_squeezing);
|
||||||
printer.print_all(&input[..], None).unwrap();
|
printer.print_all(&input[..]).unwrap();
|
||||||
}
|
}
|
||||||
+2
-2
@@ -448,7 +448,7 @@ mod tests {
|
|||||||
let mut output = vec![];
|
let mut output = vec![];
|
||||||
let mut printer = Printer::new(&mut output, false, BorderStyle::Unicode, true);
|
let mut printer = Printer::new(&mut output, false, BorderStyle::Unicode, true);
|
||||||
|
|
||||||
printer.print_all(input, None).unwrap();
|
printer.print_all(input).unwrap();
|
||||||
|
|
||||||
let actual_string: &str = str::from_utf8(&output).unwrap();
|
let actual_string: &str = str::from_utf8(&output).unwrap();
|
||||||
assert_eq!(actual_string, expected_string)
|
assert_eq!(actual_string, expected_string)
|
||||||
@@ -493,7 +493,7 @@ mod tests {
|
|||||||
Printer::new(&mut output, false, BorderStyle::Unicode, true);
|
Printer::new(&mut output, false, BorderStyle::Unicode, true);
|
||||||
printer.display_offset(0xdeadbeef);
|
printer.display_offset(0xdeadbeef);
|
||||||
|
|
||||||
printer.print_all(input, None).unwrap();
|
printer.print_all(input).unwrap();
|
||||||
|
|
||||||
let actual_string: &str = str::from_utf8(&output).unwrap();
|
let actual_string: &str = str::from_utf8(&output).unwrap();
|
||||||
assert_eq!(actual_string, expected_string)
|
assert_eq!(actual_string, expected_string)
|
||||||
|
|||||||
Reference in new issue
Block a user