mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-09 23:57:48 +02:00
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:
committed by
GitHub
parent
c5602f9766
commit
8f99a78cf1
@ -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()
|
||||
|
Reference in New Issue
Block a user