Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/syntax_highlighting/tests.rs')
-rw-r--r--crates/ide/src/syntax_highlighting/tests.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs
index c9c23318f5..4beab9909c 100644
--- a/crates/ide/src/syntax_highlighting/tests.rs
+++ b/crates/ide/src/syntax_highlighting/tests.rs
@@ -641,11 +641,14 @@ fn main() {
fn test_highlight_doc_comment() {
check_highlighting(
r#"
+//- /main.rs
//! This is a module to test doc injection.
//! ```
//! fn test() {}
//! ```
+mod outline_module;
+
/// ```
/// let _ = "early doctests should not go boom";
/// ```
@@ -771,6 +774,13 @@ pub fn block_comments() {}
[`block_comments`] tests these without indentation
*/
pub fn block_comments2() {}
+
+//- /outline_module.rs
+//! This is an outline module whose purpose is to test that its inline attribute injection does not
+//! spill into its parent.
+//! ```
+//! fn test() {}
+//! ```
"#
.trim(),
expect_file!["./test_data/highlight_doctest.html"],