mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-03 11:52:26 +01:00
Added three new snapshot tests for --tabs and --wrap.
This commit is contained in:
@@ -38,13 +38,14 @@ impl BatTester {
|
||||
BatTester { temp_dir, exe }
|
||||
}
|
||||
|
||||
pub fn test_snapshot(&self, name: &str, style: &str, tab_width: u32) {
|
||||
pub fn test_snapshot(&self, name: &str, style: &str, tab_width: u32, wrap: bool) {
|
||||
let output = Command::new(&self.exe)
|
||||
.current_dir(self.temp_dir.path())
|
||||
.args(&[
|
||||
"sample.rs",
|
||||
"--decorations=always",
|
||||
"--terminal-width=80",
|
||||
&format!("--wrap={}", if wrap { "character" } else { "never" }),
|
||||
&format!("--tabs={}", tab_width),
|
||||
&format!("--style={}", style),
|
||||
]).output()
|
||||
|
Reference in New Issue
Block a user