mirror of
https://github.com/sharkdp/bat.git
synced 2026-02-08 08:42:08 +00:00
Limit overstrike stripping to man pages and help
This commit is contained in:
@@ -2556,7 +2556,7 @@ fn no_strip_overstrike_for_plain_text() {
|
||||
|
||||
#[test]
|
||||
fn strip_overstrike_with_syntax_highlighting() {
|
||||
// Overstrike is stripped when syntax highlighting is applied (e.g., for help)
|
||||
// Overstrike is stripped for certain syntax highlighting like command help.
|
||||
bat()
|
||||
.arg("--force-colorization")
|
||||
.arg("--language=help")
|
||||
@@ -2581,6 +2581,19 @@ fn strip_overstrike_for_manpage_syntax() {
|
||||
.stderr("");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_strip_overstrike_for_other_syntax() {
|
||||
// Overstrike is NOT stripped for other syntaxes (e.g., Rust)
|
||||
bat()
|
||||
.arg("--force-colorization")
|
||||
.arg("--language=rust")
|
||||
.arg("overstrike.txt")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(predicate::str::contains("\x08"))
|
||||
.stderr("");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn show_all_shows_backspace_with_caret_notation() {
|
||||
// --show-all should display backspace characters (not strip them)
|
||||
|
||||
Reference in New Issue
Block a user