mirror of
https://github.com/sharkdp/bat
synced 2024-12-23 10:43:07 +00:00
621ab6078f
git2-rs MSRV policy is to only support latest stable rust (see https://github.com/rust-lang/git2-rs#rust-version-requirements), so it does not make sense to run our MSRV tests with git enabled.
45 lines
1.7 KiB
Rust
45 lines
1.7 KiB
Rust
#[cfg(feature = "git")]
|
|
mod tester;
|
|
|
|
macro_rules! snapshot_tests {
|
|
($($test_name: ident: $style: expr,)*) => {
|
|
$(
|
|
#[test]
|
|
#[cfg(feature = "git")]
|
|
fn $test_name() {
|
|
let bat_tester = tester::BatTester::default();
|
|
bat_tester.test_snapshot(stringify!($test_name), $style);
|
|
}
|
|
)*
|
|
};
|
|
}
|
|
|
|
snapshot_tests! {
|
|
changes: "changes",
|
|
grid: "grid",
|
|
header: "header",
|
|
numbers: "numbers",
|
|
rule: "rule",
|
|
changes_grid: "changes,grid",
|
|
changes_header: "changes,header",
|
|
changes_numbers: "changes,numbers",
|
|
changes_rule: "changes,rule",
|
|
grid_header: "grid,header",
|
|
grid_numbers: "grid,numbers",
|
|
grid_rule: "grid,rule",
|
|
header_numbers: "header,numbers",
|
|
header_rule: "header,rule",
|
|
changes_grid_header: "changes,grid,header",
|
|
changes_grid_numbers: "changes,grid,numbers",
|
|
changes_grid_rule: "changes,grid,rule",
|
|
changes_header_numbers: "changes,header,numbers",
|
|
changes_header_rule: "changes,header,rule",
|
|
grid_header_numbers: "grid,header,numbers",
|
|
grid_header_rule: "grid,header,rule",
|
|
header_numbers_rule: "header,numbers,rule",
|
|
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",
|
|
full: "full",
|
|
plain: "plain",
|
|
}
|