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

Enable non-printable chars for redirected output (#1061)

This commit is contained in:
Evgeniy Andreev (gsomix)
2020-06-20 19:00:32 +04:00
parent 62b4452057
commit 3c5ce9f86c
5 changed files with 30 additions and 7 deletions

BIN
tests/examples/nonprintable.txt vendored Normal file

Binary file not shown.

View File

@@ -716,3 +716,13 @@ fn do_not_detect_different_syntax_for_stdin_and_files() {
from_utf8(&cmd_for_stdin.get_output().stdout).expect("output is valid utf-8")
);
}
#[test]
fn show_all_mode() {
bat()
.arg("--show-all")
.arg("nonprintable.txt")
.assert()
.stdout("hello•world␊\n├──┤␍␀␇␈␛")
.stderr("");
}