mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-18 20:11:03 +00:00
Remove leftovers from tab-tests
This commit is contained in:
parent
88fcfd76aa
commit
f7d9f49503
@ -3,33 +3,33 @@ mod tester;
|
||||
use tester::BatTester;
|
||||
|
||||
macro_rules! snapshot_tests {
|
||||
($($test_name: ident: $style: expr => [wrap: $wrap:expr, tabs: $tabs:expr],)*) => {
|
||||
($($test_name: ident: $style: expr,)*) => {
|
||||
$(
|
||||
#[test]
|
||||
fn $test_name() {
|
||||
let bat_tester = BatTester::new();
|
||||
bat_tester.test_snapshot(stringify!($test_name), $style, $tabs, $wrap);
|
||||
bat_tester.test_snapshot(stringify!($test_name), $style);
|
||||
}
|
||||
)*
|
||||
};
|
||||
}
|
||||
|
||||
snapshot_tests! {
|
||||
changes: "changes" => [wrap: false, tabs: 8],
|
||||
grid: "grid" => [wrap: false, tabs: 8],
|
||||
header: "header" => [wrap: false, tabs: 8],
|
||||
numbers: "numbers" => [wrap: false, tabs: 8],
|
||||
changes_grid: "changes,grid" => [wrap: false, tabs: 8],
|
||||
changes_header: "changes,header" => [wrap: false, tabs: 8],
|
||||
changes_numbers: "changes,numbers" => [wrap: false, tabs: 8],
|
||||
grid_header: "grid,header" => [wrap: false, tabs: 8],
|
||||
grid_numbers: "grid,numbers" => [wrap: false, tabs: 8],
|
||||
header_numbers: "header,numbers" => [wrap: false, tabs: 8],
|
||||
changes_grid_header: "changes,grid,header" => [wrap: false, tabs: 8],
|
||||
changes_grid_numbers: "changes,grid,numbers" => [wrap: false, tabs: 8],
|
||||
changes_header_numbers: "changes,header,numbers" => [wrap: false, tabs: 8],
|
||||
grid_header_numbers: "grid,header,numbers" => [wrap: false, tabs: 8],
|
||||
changes_grid_header_numbers: "changes,grid,header,numbers" => [wrap: false, tabs: 8],
|
||||
full: "full" => [wrap: false, tabs: 8],
|
||||
plain: "plain" => [wrap: false, tabs: 0],
|
||||
changes: "changes",
|
||||
grid: "grid",
|
||||
header: "header",
|
||||
numbers: "numbers",
|
||||
changes_grid: "changes,grid",
|
||||
changes_header: "changes,header",
|
||||
changes_numbers: "changes,numbers",
|
||||
grid_header: "grid,header",
|
||||
grid_numbers: "grid,numbers",
|
||||
header_numbers: "header,numbers",
|
||||
changes_grid_header: "changes,grid,header",
|
||||
changes_grid_numbers: "changes,grid,numbers",
|
||||
changes_header_numbers: "changes,header,numbers",
|
||||
grid_header_numbers: "grid,header,numbers",
|
||||
changes_grid_header_numbers: "changes,grid,header,numbers",
|
||||
full: "full",
|
||||
plain: "plain",
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ impl BatTester {
|
||||
BatTester { temp_dir, exe }
|
||||
}
|
||||
|
||||
pub fn test_snapshot(&self, name: &str, style: &str, tab_width: u32, wrap: bool) {
|
||||
pub fn test_snapshot(&self, name: &str, style: &str) {
|
||||
let output = Command::new(&self.exe)
|
||||
.current_dir(self.temp_dir.path())
|
||||
.args(&[
|
||||
@ -48,8 +48,6 @@ impl BatTester {
|
||||
"--color=never",
|
||||
"--decorations=always",
|
||||
"--terminal-width=80",
|
||||
&format!("--wrap={}", if wrap { "character" } else { "never" }),
|
||||
&format!("--tabs={}", tab_width),
|
||||
&format!("--style={}", style),
|
||||
])
|
||||
.output()
|
||||
|
Loading…
x
Reference in New Issue
Block a user