Skip to content

Commit 752fb52

Browse files
Add @files checks in rustdoc tests
1 parent 65a7047 commit 752fb52

4 files changed

+17
-0
lines changed

tests/rustdoc/files-creation-hidden.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![crate_name="foo"]
22

3+
// @files foo '["index.html", "all.html", "sidebar-items.js"]'
34
// @!has "foo/struct.Foo.html"
45
#[doc(hidden)]
56
pub struct Foo;

tests/rustdoc/files-creation-private.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#![crate_name="foo"]
22

3+
// @files "foo" \
4+
// '["index.html", "all.html", "sidebar-items.js", "foo", "bar", "private", "struct.Bar.html"]'
5+
// @files "foo/bar" '["index.html", "sidebar-items.js"]'
6+
37
// @!has "foo/priv/index.html"
48
// @!has "foo/priv/struct.Foo.html"
59
mod private {

tests/rustdoc/issue-111064-reexport-trait-from-hidden-2.rs

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
#![no_core]
33
#![crate_name = "foo"]
44

5+
// @files "foo" "['sidebar-items.js', 'all.html', 'hidden', 'index.html', 'struct.Bar.html', \
6+
// 'visible']"
7+
// @files "foo/hidden" "['inner']"
8+
// @files "foo/hidden/inner" "['trait.Foo.html']"
9+
// @files "foo/visible" "['index.html', 'sidebar-items.js', 'trait.Foo.html']"
10+
511
// @!has 'foo/hidden/index.html'
612
// @!has 'foo/hidden/inner/index.html'
713
// FIXME: Should be `@!has`: https://github.com/rust-lang/rust/issues/111249

tests/rustdoc/issue-111249-file-creation.rs

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
#![feature(no_core)]
33
#![no_core]
44

5+
// @files "foo" "['all.html', 'visible', 'index.html', 'sidebar-items.js', 'hidden', \
6+
// 'struct.Bar.html']"
7+
// @files "foo/visible" "['trait.Foo.html', 'index.html', 'sidebar-items.js']"
8+
// @files "foo/hidden" "['inner']"
9+
// @files "foo/hidden/inner" "['trait.Foo.html']"
10+
511
// The following five should not fail!
612
// @!has 'foo/hidden/index.html'
713
// @!has 'foo/hidden/inner/index.html'

0 commit comments

Comments
 (0)