Added three new snapshot tests for --tabs and --wrap.

This commit is contained in:
eth-p committed 2018-09-11 13:47:01 -07:00
1 parent d90797f8e9
commit c1e1f753cf
6 files changed
+153 -26

No files matched your search

+2 -1
View File
@@ -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()