2018-05-12 16:48:45 +02:00
|
|
|
mod tester;
|
|
|
|
|
|
|
|
use tester::BatTester;
|
|
|
|
|
2018-08-31 22:24:36 +02:00
|
|
|
macro_rules! snapshot_tests {
|
2018-09-11 22:47:01 +02:00
|
|
|
($($test_name: ident: $style: expr => [wrap: $wrap:expr, tabs: $tabs:expr],)*) => {
|
2018-08-31 22:24:36 +02:00
|
|
|
$(
|
|
|
|
#[test]
|
|
|
|
fn $test_name() {
|
|
|
|
let bat_tester = BatTester::new();
|
2018-09-11 22:47:01 +02:00
|
|
|
bat_tester.test_snapshot(stringify!($test_name), $style, $tabs, $wrap);
|
2018-08-31 22:24:36 +02:00
|
|
|
}
|
|
|
|
)*
|
|
|
|
};
|
|
|
|
}
|
2018-05-12 16:48:45 +02:00
|
|
|
|
2018-08-31 22:24:36 +02:00
|
|
|
snapshot_tests! {
|
2018-09-11 22:47:01 +02:00
|
|
|
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],
|
2018-09-12 20:32:33 +02:00
|
|
|
plain: "plain" => [wrap: false, tabs: 0],
|
2018-09-11 22:47:01 +02:00
|
|
|
tabs_passthrough_wrapped: "full" => [wrap: true, tabs: 0],
|
|
|
|
tabs_4_wrapped: "full" => [wrap: true, tabs: 4],
|
|
|
|
tabs_8_wrapped: "full" => [wrap: true, tabs: 8],
|
|
|
|
tabs_passthrough: "full" => [wrap: false, tabs: 0],
|
|
|
|
tabs_4: "full" => [wrap: false, tabs: 4],
|
|
|
|
tabs_8: "full" => [wrap: false, tabs: 8],
|
2018-05-12 16:48:45 +02:00
|
|
|
}
|