test(frontmatter): Cover spaces between infostring parts
As these characters are specifically called out in the RFC, I felt it would be important to have a test to cover them.
This commit is contained in:
parent
11d2046fe9
commit
bca35effc2
2 changed files with 19 additions and 0 deletions
9
tests/ui/frontmatter/space-in-infostring.rs
Normal file
9
tests/ui/frontmatter/space-in-infostring.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
--- cargo clippy
|
||||
//~^ ERROR: invalid infostring for frontmatter
|
||||
---
|
||||
|
||||
// infostrings cannot have spaces
|
||||
|
||||
#![feature(frontmatter)]
|
||||
|
||||
fn main() {}
|
||||
10
tests/ui/frontmatter/space-in-infostring.stderr
Normal file
10
tests/ui/frontmatter/space-in-infostring.stderr
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
error: invalid infostring for frontmatter
|
||||
--> $DIR/space-in-infostring.rs:1:4
|
||||
|
|
||||
LL | --- cargo clippy
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: frontmatter infostrings must be a single identifier immediately following the opening
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue