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 authored and GitHub committed 2023-03-14 22:21:30 +01:00
1 parent c5602f9766
commit 8f99a78cf1
11 files changed
+151 -37

No files matched your search

+11
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()