Rollup merge of #148639 - midsterx:test/rustdoc, r=GuillaumeGomez
test(rustdoc): move tests into jump-to-def Fixes https://github.com/rust-lang/rust/issues/148548
This commit is contained in:
commit
f342c62537
11 changed files with 23 additions and 23 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
//@ has 'src/foo/jump-to-def-assoc-items.rs.html'
|
||||
//@ has 'src/foo/assoc-items.rs.html'
|
||||
|
||||
pub trait Trait {
|
||||
type T;
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
//@ has 'src/foo/jump-to-def-ice-assoc-types.rs.html'
|
||||
//@ has 'src/foo/assoc-types.rs.html'
|
||||
|
||||
pub trait Trait {
|
||||
type Node;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
//@ has 'src/foo/jump-to-def-doc-links-calls.rs.html'
|
||||
//@ has 'src/foo/doc-links-calls.rs.html'
|
||||
|
||||
//@ has - '//a[@href="../../foo/struct.Bar.html"]' 'Bar'
|
||||
pub struct Bar;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
//@ has 'src/foo/jump-to-def-doc-links.rs.html'
|
||||
//@ has 'src/foo/doc-links.rs.html'
|
||||
|
||||
//@ has - '//a[@href="../../foo/struct.Bar.html"]' 'Bar'
|
||||
//@ has - '//a[@href="../../foo/struct.Foo.html"]' 'Foo'
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
//@ aux-build:jump-to-def-macro.rs
|
||||
//@ build-aux-docs
|
||||
//@ compile-flags: -Zunstable-options --generate-link-to-definition
|
||||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
//@ has 'src/foo/jump-to-def-macro.rs.html'
|
||||
|
||||
#[macro_use]
|
||||
extern crate jump_to_def_macro;
|
||||
|
||||
//@ has - '//a[@href="../../jump_to_def_macro/macro.symbols.html"]' 'symbols!'
|
||||
symbols! {
|
||||
A = 12
|
||||
}
|
||||
15
tests/rustdoc/jump-to-def/macro.rs
Normal file
15
tests/rustdoc/jump-to-def/macro.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
//@ aux-build:symbols.rs
|
||||
//@ build-aux-docs
|
||||
//@ compile-flags: -Zunstable-options --generate-link-to-definition
|
||||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
//@ has 'src/foo/macro.rs.html'
|
||||
|
||||
#[macro_use]
|
||||
extern crate symbols;
|
||||
|
||||
//@ has - '//a[@href="../../symbols/macro.symbols.html"]' 'symbols!'
|
||||
symbols! {
|
||||
A = 12
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
//@ has 'src/foo/jump-to-def-ice.rs.html'
|
||||
//@ has 'src/foo/no-body-items.rs.html'
|
||||
|
||||
pub trait A {
|
||||
type T;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
//@ has 'src/foo/jump-to-non-local-method.rs.html'
|
||||
//@ has 'src/foo/non-local-method.rs.html'
|
||||
|
||||
//@ has - '//a[@href="{{channel}}/core/sync/atomic/struct.AtomicIsize.html"]' 'std::sync::atomic::AtomicIsize'
|
||||
use std::sync::atomic::AtomicIsize;
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
//@ has 'src/foo/jump-to-def-pats.rs.html'
|
||||
//@ has 'src/foo/patterns.rs.html'
|
||||
|
||||
use std::fmt;
|
||||
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
//@ has 'src/foo/jump-to-def-prelude-types.rs.html'
|
||||
//@ has 'src/foo/prelude-types.rs.html'
|
||||
// FIXME: would be nice to be able to check both the class and the href at the same time so
|
||||
// we could check the text as well...
|
||||
//@ has - '//a[@class="prelude-ty"]/@href' '{{channel}}/core/result/enum.Result.html'
|
||||
Loading…
Add table
Add a link
Reference in a new issue