about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-09-07 22:06:40 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2017-09-11 22:31:05 +0200
commit9c12e5d4e8c1211783e2c9e6f6cc1fd0091b8724 (patch)
treedf947db04a1edfa479cf7bbab00b9af616cad66b /src/test/rustdoc
parenta095ee48d5d2287efa663ec196a017c69952b0b3 (diff)
downloadrust-9c12e5d4e8c1211783e2c9e6f6cc1fd0091b8724.tar.gz
rust-9c12e5d4e8c1211783e2c9e6f6cc1fd0091b8724.zip
add test
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/codeblock-title.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/rustdoc/codeblock-title.rs b/src/test/rustdoc/codeblock-title.rs
new file mode 100644
index 00000000000..accefd6b65f
--- /dev/null
+++ b/src/test/rustdoc/codeblock-title.rs
@@ -0,0 +1,31 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name = "foo"]
+
+// ignore-tidy-linelength
+
+// @has foo/fn.bar.html '//*[@class="tooltip compile_fail"]/span' "This code doesn't compile so be extra careful!"
+// @has foo/fn.bar.html '//*[@class="tooltip ignore"]/span' "Be careful when using this code, it's not being tested!"
+
+/// foo
+///
+/// ```compile_fail
+/// foo();
+/// ```
+///
+/// ```ignore (tidy)
+/// goo();
+/// ```
+///
+/// ```
+/// let x = 0;
+/// ```
+pub fn bar() -> usize { 2 }