Truncate multi-line debug value hints (#34305)

Release Notes:

- Multi-line debug inline values are now truncated.

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
Julia Ryan 2025-07-11 10:49:52 -07:00 committed by GitHub
parent 90bf602ceb
commit 0bd65829f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 40 additions and 3 deletions

View file

@ -2241,3 +2241,34 @@ func main() {
)
.await;
}
#[gpui::test]
async fn test_trim_multi_line_inline_value(executor: BackgroundExecutor, cx: &mut TestAppContext) {
let variables = [("y", "hello\n world")];
let before = r#"
fn main() {
let y = "hello\n world";
}
"#
.unindent();
let after = r#"
fn main() {
let y: hello = "hello\n world";
}
"#
.unindent();
test_inline_values_util(
&variables,
&[],
&before,
&after,
None,
rust_lang(),
executor,
cx,
)
.await;
}