Add extra test to ensure the highlighting for macros is working as expected
This commit is contained in:
parent
31c4ad33cc
commit
5107af264d
1 changed files with 18 additions and 0 deletions
18
tests/rustdoc-html/source-code-pages/macro-call-2.rs
Normal file
18
tests/rustdoc-html/source-code-pages/macro-call-2.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// This is yet another test to ensure that only macro calls are considered as such
|
||||
// by the rustdoc highlighter, in particular when named `macro_rules`.
|
||||
// This is a regression test for <https://github.com/rust-lang/rust/issues/151904>.
|
||||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
//@ has src/foo/macro-call-2.rs.html
|
||||
//@ count - '//code/span[@class="macro"]' 2
|
||||
//@ has - '//code/span[@class="macro"]' 'macro_rules!'
|
||||
//@ has - '//code/span[@class="macro"]' 'r#macro_rules!'
|
||||
|
||||
macro_rules! r#macro_rules {
|
||||
() => {
|
||||
fn main() {}
|
||||
}
|
||||
}
|
||||
|
||||
r#macro_rules!();
|
||||
Loading…
Add table
Add a link
Reference in a new issue