`@!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
394 B
Rust
17 lines
394 B
Rust
#![crate_name = "foo"]
|
|
|
|
// @has foo/fn.foo.html
|
|
// @!has - '//a[@href="http://a.a"]' ''
|
|
// @has - '//a[@href="#implementing-stuff-somewhere"]' 'Implementing stuff somewhere'
|
|
// @has - '//a[@href="#another-one-urg"]' 'Another one urg'
|
|
|
|
/// fooo
|
|
///
|
|
/// # Implementing [stuff](http://a.a "title") somewhere
|
|
///
|
|
/// hello
|
|
///
|
|
/// # Another [one][two] urg
|
|
///
|
|
/// [two]: http://a.a
|
|
pub fn foo() {}
|