summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Milligan <tom@reinfer.io>2020-10-12 09:02:08 +0100
committerTom Milligan <tom@reinfer.io>2020-10-12 09:04:57 +0100
commit1614f80366a1fcc344df157d04bb5284ef09ee4c (patch)
tree034b8a47b375c180be24e1d5707a921d7e7e2636
parente293c58bb0d53c32b69b5fdcd9cc6a617bf75312 (diff)
add integration test for grid overriding rule
-rw-r--r--tests/integration_tests.rs22
1 files changed, 22 insertions, 0 deletions
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() {