From 1614f80366a1fcc344df157d04bb5284ef09ee4c Mon Sep 17 00:00:00 2001 From: Tom Milligan Date: Mon, 12 Oct 2020 09:02:08 +0100 Subject: add integration test for grid overriding rule --- tests/integration_tests.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index a55d081d..f8ff60a5 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -700,6 +700,28 @@ Single Line .stderr(""); } +#[test] +fn grid_overrides_rule() { + bat() + .arg("--decorations=always") + .arg("--style=grid,rule") + .arg("--terminal-width=80") + .arg("test.txt") + .arg("single-line.txt") + .assert() + .stdout( + "\ +──────────────────────────────────────────────────────────────────────────────── +hello world +──────────────────────────────────────────────────────────────────────────────── +──────────────────────────────────────────────────────────────────────────────── +Single Line +──────────────────────────────────────────────────────────────────────────────── +", + ) + .stderr("\x1b[33m[bat warning]\x1b[0m: Style 'rule' is a subset of style 'grid', 'rule' will not be visible.\n"); +} + #[cfg(target_os = "linux")] #[test] fn file_with_invalid_utf8_filename() { -- cgit v1.2.3