`@!has` (and `@!matches`) with two arguments used to treat the second argument as a literal string of HTML code. Now, that feature has been renamed into `@!hasraw` (and `@!matchesraw`), and the arity-2 `@!has` version is an error. These uses thought the second argument was being treated as an XPath, as with the arity-3 version, but in fact was being treated as literal HTML. Because these were checking for the *absence* of the string, the tests silently did nothing -- an XPath string won't ever be showing up in the test's generated HTML!
17 lines
396 B
Rust
17 lines
396 B
Rust
#![crate_name = "foo"]
|
|
|
|
// @has foo/struct.Bar.html
|
|
// @!has - '//*[@id="impl-Sized"]' ''
|
|
pub struct Bar {
|
|
a: u16,
|
|
}
|
|
|
|
// @has foo/struct.Foo.html
|
|
// @!has - '//*[@id="impl-Sized"]' ''
|
|
pub struct Foo<T: ?Sized>(T);
|
|
|
|
// @has foo/struct.Unsized.html
|
|
// @has - '//*[@id="impl-Sized-for-Unsized"]//h3[@class="code-header in-band"]' 'impl !Sized for Unsized'
|
|
pub struct Unsized {
|
|
data: [u8],
|
|
}
|