Print non-printable characters using caret notation (#2443)

When the new flag is set, non-printable characters are printed using caret notation.
This commit is contained in:
einfachIrgendwer0815
2023-03-14 22:21:30 +01:00
committed by GitHub
parent c5602f9766
commit 8f99a78cf1
11 changed files with 151 additions and 37 deletions

View File

@ -1623,6 +1623,17 @@ fn show_all_extends_tab_markers_to_next_tabstop_width_8() {
);
}
#[test]
fn show_all_with_caret_notation() {
bat()
.arg("--show-all")
.arg("--nonprintable-notation=caret")
.arg("nonprintable.txt")
.assert()
.stdout("hello·world^J\n├──┤^M^@^G^H^[")
.stderr("");
}
#[test]
fn no_paging_arg() {
bat()