add regression test for #145529
This commit is contained in:
parent
6ba0ce4094
commit
e50fed79a8
2 changed files with 44 additions and 1 deletions
|
|
@ -121,3 +121,34 @@ pub fn no_error_1() {}
|
|||
/// backslashed \<<a href="">
|
||||
//~^ ERROR unclosed HTML tag `a`
|
||||
pub fn p() {}
|
||||
|
||||
/// <svg width="512" height="512" viewBox="0 0 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
/// <rect
|
||||
/// width="256"
|
||||
/// height="256"
|
||||
/// fill="#5064C8"
|
||||
/// stroke="black"
|
||||
/// />
|
||||
/// </svg>
|
||||
pub fn no_error_2() {}
|
||||
|
||||
/// <div>
|
||||
/// <img
|
||||
/// src="https://example.com/ferris.png"
|
||||
/// width="512"
|
||||
/// height="512"
|
||||
/// />
|
||||
/// </div>
|
||||
pub fn no_error_3() {}
|
||||
|
||||
/// unfinished ALLOWED_UNCLOSED
|
||||
///
|
||||
/// <br>
|
||||
/// <img
|
||||
//~^ ERROR unclosed HTML tag `img`
|
||||
pub fn q() {}
|
||||
|
||||
/// nested unfinished ALLOWED_UNCLOSED
|
||||
/// <p><img</p>
|
||||
//~^ ERROR unclosed HTML tag `img`
|
||||
pub fn r() {}
|
||||
|
|
|
|||
|
|
@ -100,5 +100,17 @@ error: unclosed HTML tag `a`
|
|||
LL | /// backslashed \<<a href="">
|
||||
| ^^
|
||||
|
||||
error: aborting due to 16 previous errors
|
||||
error: unclosed HTML tag `img`
|
||||
--> $DIR/invalid-html-tags.rs:147:5
|
||||
|
|
||||
LL | /// <img
|
||||
| ^^^
|
||||
|
||||
error: unclosed HTML tag `img`
|
||||
--> $DIR/invalid-html-tags.rs:152:8
|
||||
|
|
||||
LL | /// <p><img</p>
|
||||
| ^^^^
|
||||
|
||||
error: aborting due to 18 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue