Skip to content

Commit d3647fe

Browse files
committed
test: Move all run-make rustdoc tests to test/rustdoc
1 parent 10359de commit d3647fe

File tree

38 files changed

+125
-213
lines changed

38 files changed

+125
-213
lines changed

mk/tests.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
472472
DEBUGINFO_LLDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
473473
CODEGEN_RS := $(wildcard $(S)src/test/codegen/*.rs)
474474
CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
475-
RUSTDOCCK_RS := $(wildcard $(S)src/test/rustdocck/*.rs)
475+
RUSTDOCCK_RS := $(wildcard $(S)src/test/rustdoc/*.rs)
476476

477477
# perf tests are the same as bench tests only they run under
478478
# a performance monitor.

src/test/run-make/rustdoc-assoc-types/Makefile

-5
This file was deleted.

src/test/run-make/rustdoc-default-impl/Makefile

-5
This file was deleted.

src/test/run-make/rustdoc-extern-default-method/Makefile

-6
This file was deleted.

src/test/run-make/rustdoc-extern-method/Makefile

-7
This file was deleted.

src/test/run-make/rustdoc-ffi/Makefile

-8
This file was deleted.

src/test/run-make/rustdoc-hidden-line/Makefile

-15
This file was deleted.

src/test/run-make/rustdoc-must-use/Makefile

-5
This file was deleted.

src/test/run-make/rustdoc-negative-impl/Makefile

-5
This file was deleted.

src/test/run-make/rustdoc-recursion/Makefile

-11
This file was deleted.

src/test/run-make/rustdoc-search-index/Makefile

-15
This file was deleted.

src/test/run-make/rustdoc-smoke/Makefile

-4
This file was deleted.

src/test/run-make/rustdoc-src-links/Makefile

-5
This file was deleted.

src/test/run-make/rustdoc-src-links/foo.rs

-43
This file was deleted.

src/test/run-make/rustdoc-src-links/qux/mod.rs

-39
This file was deleted.

src/test/run-make/rustdoc-viewpath-self/Makefile

-5
This file was deleted.

src/test/run-make/rustdoc-where/Makefile

-5
This file was deleted.

src/test/run-make/rustdoc-assoc-types/lib.rs renamed to src/test/rustdoc/assoc-types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#![crate_type="lib"]
1212

13-
// @has lib/trait.Index.html
13+
// @has assoc_types/trait.Index.html
1414
pub trait Index<I: ?Sized> {
1515
// @has - '//*[@id="associatedtype.Output"]//code' 'type Output: ?Sized'
1616
type Output: ?Sized;

src/test/run-make/rustdoc-default-impl/bar.rs renamed to src/test/rustdoc/default-impl.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
extern crate foo;
11+
// aux-build:rustdoc-default-impl.rs
12+
13+
extern crate rustdoc_default_impl as foo;
1214

1315
pub use foo::bar;
1416

src/test/run-make/rustdoc-extern-default-method/lib.rs renamed to src/test/rustdoc/extern-default-method.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
extern crate ext;
11+
// aux-build:rustdoc-extern-default-method.rs
1212

13-
// @count lib/struct.Struct.html '//*[@id="method.provided"]' 1
13+
extern crate rustdoc_extern_default_method as ext;
14+
15+
// @count extern_default_method/struct.Struct.html '//*[@id="method.provided"]' 1
1416
pub use ext::Struct;

src/test/run-make/rustdoc-extern-method/bar.rs renamed to src/test/rustdoc/extern-method.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// aux-build:rustdoc-extern-method.rs
12+
1113
#![feature(unboxed_closures)]
1214

13-
extern crate foo;
15+
extern crate rustdoc_extern_method as foo;
1416

15-
// @has bar/trait.Foo.html //pre "pub trait Foo"
17+
// @has extern_method/trait.Foo.html //pre "pub trait Foo"
1618
// @has - '//*[@id="tymethod.foo"]//code' 'extern "rust-call" fn foo'
1719
// @has - '//*[@id="tymethod.foo_"]//code' 'extern "rust-call" fn foo_'
1820
pub use foo::Foo;
1921

20-
// @has bar/trait.Bar.html //pre "pub trait Bar"
22+
// @has extern_method/trait.Bar.html //pre "pub trait Bar"
2123
pub trait Bar {
2224
// @has - '//*[@id="tymethod.bar"]//code' 'extern "rust-call" fn bar'
2325
extern "rust-call" fn bar(&self, _: ());

src/test/run-make/rustdoc-ffi/user.rs renamed to src/test/rustdoc/ffi.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![crate_type="lib"]
11+
// aux-build:rustdoc-ffi.rs
1212

13-
extern crate lib;
13+
extern crate rustdoc_ffi as lib;
1414

15-
// @has user/fn.foreigner.html //pre 'pub unsafe fn foreigner(cold_as_ice: u32)'
15+
// @has ffi/fn.foreigner.html //pre 'pub unsafe fn foreigner(cold_as_ice: u32)'
1616
pub use lib::foreigner;
17+
18+
extern "C" {
19+
// @has ffi/fn.another.html //pre 'pub unsafe fn another(cold_as_ice: u32)'
20+
pub fn another(cold_as_ice: u32);
21+
}

src/test/run-make/rustdoc-hidden-line/foo.rs renamed to src/test/rustdoc/hidden-line.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![crate_name="foo"]
12-
1311
/// The '# ' lines should be removed from the output, but the #[derive] should be
1412
/// retained.
1513
///
@@ -31,5 +29,5 @@
3129
/// ```
3230
pub fn foo() {}
3331

34-
// @!has foo/fn.foo.html invisible
32+
// @!has hidden_line/fn.foo.html invisible
3533
// @matches - //pre "#\[derive\(PartialEq\)\] // Bar"

src/test/run-make/rustdoc-must-use/lib.rs renamed to src/test/rustdoc/must-use.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![crate_type="lib"]
12-
13-
// @has lib/struct.Struct.html //pre '#[must_use]'
11+
// @has must_use/struct.Struct.html //pre '#[must_use]'
1412
#[must_use]
1513
pub struct Struct {
1614
field: i32,
1715
}
1816

19-
// @has lib/enum.Enum.html //pre '#[must_use = "message"]'
17+
// @has must_use/enum.Enum.html //pre '#[must_use = "message"]'
2018
#[must_use = "message"]
2119
pub enum Enum {
2220
Variant(i32),

src/test/run-make/rustdoc-negative-impl/foo.rs renamed to src/test/rustdoc/negative-impl.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111
#![feature(optin_builtin_traits)]
1212

13-
// @matches foo/struct.Alpha.html '//pre' "pub struct Alpha"
13+
// @matches negative_impl/struct.Alpha.html '//pre' "pub struct Alpha"
1414
pub struct Alpha;
15-
// @matches foo/struct.Bravo.html '//pre' "pub struct Bravo<B>"
15+
// @matches negative_impl/struct.Bravo.html '//pre' "pub struct Bravo<B>"
1616
pub struct Bravo<B>(B);
1717

18-
// @matches foo/struct.Alpha.html '//*[@class="impl"]//code' "impl !Send for Alpha"
18+
// @matches negative_impl/struct.Alpha.html '//*[@class="impl"]//code' "impl !Send for Alpha"
1919
impl !Send for Alpha {}
2020

21-
// @matches foo/struct.Bravo.html '//*[@class="impl"]//code' "impl<B> !Send for Bravo<B>"
21+
// @matches negative_impl/struct.Bravo.html '//*[@class="impl"]//code' "impl<B> !Send for Bravo<B>"
2222
impl<B> !Send for Bravo<B> {}

src/test/run-make/rustdoc-smoke/foo.rs renamed to src/test/rustdoc/smoke.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,28 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// @has foo/index.html
12-
#![crate_name = "foo"]
11+
// @has smoke/index.html
1312

1413
//! Very docs
1514
16-
// @has foo/bar/index.html
15+
// @has smoke/bar/index.html
1716
pub mod bar {
1817

1918
/// So correct
20-
// @has foo/bar/baz/index.html
19+
// @has smoke/bar/baz/index.html
2120
pub mod baz {
2221
/// Much detail
23-
// @has foo/bar/baz/fn.baz.html
22+
// @has smoke/bar/baz/fn.baz.html
2423
pub fn baz() { }
2524
}
2625

2726
/// *wow*
28-
// @has foo/bar/trait.Doge.html
27+
// @has smoke/bar/trait.Doge.html
2928
pub trait Doge { fn dummy(&self) { } }
3029

31-
// @has foo/bar/struct.Foo.html
30+
// @has smoke/bar/struct.Foo.html
3231
pub struct Foo { x: isize, y: usize }
3332

34-
// @has foo/bar/fn.prawns.html
33+
// @has smoke/bar/fn.prawns.html
3534
pub fn prawns((a, b): (isize, usize), Foo { x, y }: Foo) { }
3635
}

0 commit comments

Comments
 (0)