Update rustdoc tests

This commit is contained in:
Guillaume Gomez 2025-02-07 17:50:14 +01:00
parent 0395fc2242
commit 673fd23dff
10 changed files with 72 additions and 156 deletions

View file

@ -23,7 +23,7 @@ fn test_html_highlighting() {
let src = include_str!("fixtures/sample.rs");
let html = {
let mut out = Buffer::new();
write_code(&mut out, src, None, None);
write_code(&mut out, src, None, None, None);
format!("{STYLE}<pre><code>{}</code></pre>\n", out.into_inner())
};
expect_file!["fixtures/sample.html"].assert_eq(&html);
@ -37,7 +37,7 @@ fn test_dos_backline() {
println!(\"foo\");\r\n\
}\r\n";
let mut html = Buffer::new();
write_code(&mut html, src, None, None);
write_code(&mut html, src, None, None, None);
expect_file!["fixtures/dos_line.html"].assert_eq(&html.into_inner());
});
}
@ -51,7 +51,7 @@ let x = super::b::foo;
let y = Self::whatever;";
let mut html = Buffer::new();
write_code(&mut html, src, None, None);
write_code(&mut html, src, None, None, None);
expect_file!["fixtures/highlight.html"].assert_eq(&html.into_inner());
});
}
@ -61,7 +61,7 @@ fn test_union_highlighting() {
create_default_session_globals_then(|| {
let src = include_str!("fixtures/union.rs");
let mut html = Buffer::new();
write_code(&mut html, src, None, None);
write_code(&mut html, src, None, None, None);
expect_file!["fixtures/union.html"].assert_eq(&html.into_inner());
});
}
@ -78,7 +78,7 @@ let a = 4;";
decorations.insert("example2", vec![(22, 32)]);
let mut html = Buffer::new();
write_code(&mut html, src, None, Some(&DecorationInfo(decorations)));
write_code(&mut html, src, None, Some(&DecorationInfo(decorations)), None);
expect_file!["fixtures/decorations.html"].assert_eq(&html.into_inner());
});
}