1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-01 19:02:22 +01:00

Add padding above headers when no grid

This commit is contained in:
Prat T
2020-05-11 17:57:51 -07:00
committed by David Peter
parent 1a6e8d297f
commit 0040fef215
3 changed files with 40 additions and 6 deletions

View File

@@ -611,7 +611,7 @@ fn filename_multiple_ok() {
.arg("--file-name=bar")
.assert()
.success()
.stdout("File: foo\nFile: bar\n")
.stdout("File: foo\n\nFile: bar\n")
.stderr("");
}
@@ -628,6 +628,18 @@ fn filename_multiple_err() {
.failure();
}
#[test]
fn header_padding() {
bat()
.arg("--decorations=always")
.arg("--style=plain")
.arg("test.txt")
.arg("single-line.txt")
.assert()
.stdout("hello world\n\nSingle Line\n")
.stderr("");
}
#[cfg(target_os = "linux")]
#[test]
fn file_with_invalid_utf8_filename() {