1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-01 10:52:24 +01:00

Allow for multiple line ranges

See #23
This commit is contained in:
sharkdp
2018-10-20 00:10:10 +02:00
committed by David Peter
parent 7082fd09f0
commit 496e0bc046
5 changed files with 142 additions and 21 deletions

View File

@@ -96,6 +96,17 @@ fn line_range_last_3() {
.stdout("line 2\nline 3\nline 4\n");
}
#[test]
fn line_range_multiple() {
bat()
.arg("multiline.txt")
.arg("--line-range=1:2")
.arg("--line-range=4:4")
.assert()
.success()
.stdout("line 1\nline 2\nline 4\n");
}
#[test]
fn tabs_numbers() {
bat()