on master help sign in
Add test for 'snip' feature
commit3a75d85b80a9caacb2e0045b418ebc8b506db301 authorsharkdp <davidpeter@web.de> dateSat 31 Aug 2019, 12:46 (7 years ago) parent63d652d
1 file changed+19
tests/integration_tests.rs+19
tests/integration_tests.rs+19
@@ -463,3 +463,22 @@ fn can_print_file_named_cache() {
463463fn does_not_print_unwanted_file_named_cache() {
464464 bat_with_config().arg("cach").assert().failure();
465465}
466+
467+#[test]
468+fn snip() {
469+ bat()
470+ .arg("multiline.txt")
471+ .arg("--style=numbers,snip")
472+ .arg("--decorations=always")
473+ .arg("--line-range=1:2")
474+ .arg("--line-range=4:")
475+ .assert()
476+ .success()
477+ .stdout(
478+ " 1 line 1
479+ 2 line 2
480+ ...─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ 8< ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
481+ 4 line 4
482+",
483+ );
484+}