mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-18 20:11:03 +00:00
Add regression test for #2541
More specifically, the test ensures that OSC sequences don't end up wrapping the line.
This commit is contained in:
parent
054421268f
commit
3d04699710
1
tests/examples/regression_tests/issue_2541.txt
vendored
Normal file
1
tests/examples/regression_tests/issue_2541.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
]8;;http://example.com\This is a link]8;;\n
|
@ -1163,6 +1163,20 @@ fn bom_stripped_when_no_color_and_not_loop_through() {
|
||||
);
|
||||
}
|
||||
|
||||
// Regression test for https://github.com/sharkdp/bat/issues/2541
|
||||
#[test]
|
||||
fn no_broken_osc_emit_with_line_wrapping() {
|
||||
bat()
|
||||
.arg("--color=always")
|
||||
.arg("--decorations=never")
|
||||
.arg("--wrap=character")
|
||||
.arg("--terminal-width=40")
|
||||
.arg("regression_tests/issue_2541.txt")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(predicate::function(|s: &str| s.lines().count() == 1));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn can_print_file_named_cache() {
|
||||
bat_with_config()
|
||||
|
Loading…
x
Reference in New Issue
Block a user