2
0
mirror of https://github.com/sharkdp/bat synced 2024-11-15 00:12:57 +00:00
bat/tests/snapshot_tests.rs

46 lines
1.7 KiB
Rust
Raw Normal View History

2018-10-10 20:56:56 +00:00
mod tester;
2019-03-08 10:48:22 +00:00
use crate::tester::BatTester;
2018-10-10 20:56:56 +00:00
macro_rules! snapshot_tests {
2018-10-19 19:10:32 +00:00
($($test_name: ident: $style: expr,)*) => {
2018-10-10 20:56:56 +00:00
$(
#[test]
fn $test_name() {
let bat_tester = BatTester::default();
2018-10-19 19:10:32 +00:00
bat_tester.test_snapshot(stringify!($test_name), $style);
2018-10-10 20:56:56 +00:00
}
)*
};
}
snapshot_tests! {
2018-10-19 19:10:32 +00:00
changes: "changes",
grid: "grid",
header: "header",
numbers: "numbers",
rule: "rule",
2018-10-19 19:10:32 +00:00
changes_grid: "changes,grid",
changes_header: "changes,header",
changes_numbers: "changes,numbers",
changes_rule: "changes,rule",
2018-10-19 19:10:32 +00:00
grid_header: "grid,header",
grid_numbers: "grid,numbers",
grid_rule: "grid,rule",
2018-10-19 19:10:32 +00:00
header_numbers: "header,numbers",
header_rule: "header,rule",
2018-10-19 19:10:32 +00:00
changes_grid_header: "changes,grid,header",
changes_grid_numbers: "changes,grid,numbers",
changes_grid_rule: "changes,grid,rule",
2018-10-19 19:10:32 +00:00
changes_header_numbers: "changes,header,numbers",
changes_header_rule: "changes,header,rule",
2018-10-19 19:10:32 +00:00
grid_header_numbers: "grid,header,numbers",
grid_header_rule: "grid,header,rule",
header_numbers_rule: "header,numbers,rule",
2018-10-19 19:10:32 +00:00
changes_grid_header_numbers: "changes,grid,header,numbers",
changes_grid_header_rule: "changes,grid,header,rule",
changes_grid_header_numbers_rule: "changes,grid,header,numbers,rule",
2018-10-19 19:10:32 +00:00
full: "full",
plain: "plain",
2018-10-10 20:56:56 +00:00
}