diff options
author | sharkdp <davidpeter@web.de> | 2019-08-31 12:46:03 +0200 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2019-08-31 13:46:48 +0200 |
commit | 3a75d85b80a9caacb2e0045b418ebc8b506db301 (patch) | |
tree | d9dfffebdb79d2c906c511f140e101bf4fdebf00 /tests | |
parent | 63d652dab5e82fb56ea3a347ade98ed93251a1a4 (diff) |
Add test for 'snip' feature
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration_tests.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index ec1ffd3f..ac4e3d81 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -463,3 +463,22 @@ fn can_print_file_named_cache() { fn does_not_print_unwanted_file_named_cache() { bat_with_config().arg("cach").assert().failure(); } + +#[test] +fn snip() { + bat() + .arg("multiline.txt") + .arg("--style=numbers,snip") + .arg("--decorations=always") + .arg("--line-range=1:2") + .arg("--line-range=4:") + .assert() + .success() + .stdout( + " 1 line 1 + 2 line 2 + ...─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ 8< ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ + 4 line 4 +", + ); +} |