about summary refs log tree commit diff
path: root/tests/rustdoc/sidebar/module.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/sidebar/module.rs')
-rw-r--r--tests/rustdoc/sidebar/module.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/rustdoc/sidebar/module.rs b/tests/rustdoc/sidebar/module.rs
new file mode 100644
index 00000000000..b5bcb9f232c
--- /dev/null
+++ b/tests/rustdoc/sidebar/module.rs
@@ -0,0 +1,16 @@
+#![crate_name = "foo"]
+
+//@ has 'foo/index.html'
+//@ has - '//section[@id="rustdoc-toc"]/h3' 'Crate Items'
+
+//@ has 'foo/bar/index.html'
+//@ has - '//section[@id="rustdoc-toc"]/h3' 'Module Items'
+pub mod bar {
+    //@ has 'foo/bar/struct.Baz.html'
+    //@ !has - '//section[@id="rustdoc-toc"]/h3' 'Module Items'
+    pub struct Baz;
+}
+
+//@ has 'foo/baz/index.html'
+//@ !has - '//section[@id="rustdoc-toc"]/h3' 'Module Items'
+pub mod baz {}