about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-04-02 18:16:09 +0000
committerbors <bors@rust-lang.org>2017-04-02 18:16:09 +0000
commit72ecd79a6c92bd946362e7696ee86a51f337e12f (patch)
tree9cb7668def0556da844069189441f2e761d3a4ae /src/test/rustdoc
parent5e122f59ba23494d460466cca53c71646d99c767 (diff)
parentef01ae7fe0652c050ec9af8f70990bb01309ffbc (diff)
downloadrust-72ecd79a6c92bd946362e7696ee86a51f337e12f.tar.gz
rust-72ecd79a6c92bd946362e7696ee86a51f337e12f.zip
Auto merge of #40919 - GuillaumeGomez:fix-new-rustdoc, r=frewsxcv,steveklabnik
Add support for image, rules and footnotes

Part of #40912.

r? @rust-lang/docs

PS: the footnotes are waiting for https://github.com/google/pulldown-cmark/pull/21 to be merged to be fully working.
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/check-hard-break.rs19
-rw-r--r--src/test/rustdoc/check-rule-image-footnote.rs40
2 files changed, 59 insertions, 0 deletions
diff --git a/src/test/rustdoc/check-hard-break.rs b/src/test/rustdoc/check-hard-break.rs
new file mode 100644
index 00000000000..5c5e3f8136c
--- /dev/null
+++ b/src/test/rustdoc/check-hard-break.rs
@@ -0,0 +1,19 @@
+// Copyright 2017 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-end-whitespace
+
+// @has foo/fn.f.html
+// @has - '<p>hard break:<br>after hard break</p>'
+/// hard break:  
+/// after hard break
+pub fn f() {}
diff --git a/src/test/rustdoc/check-rule-image-footnote.rs b/src/test/rustdoc/check-rule-image-footnote.rs
new file mode 100644
index 00000000000..4d3bea20ba8
--- /dev/null
+++ b/src/test/rustdoc/check-rule-image-footnote.rs
@@ -0,0 +1,40 @@
+// Copyright 2017 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.f.html
+// @has - '<p>markdown test</p><p>this is a <a href="https://example.com" title="this is a title">link</a>.</p><p>hard break: after hard break</p><hr><p>a footnote<sup id="supref1"><a href="#ref1">1</a></sup>.</p><p>another footnote<sup id="supref2"><a href="#ref2">2</a></sup>.</p><p><img src="https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png" alt="Rust"></p><div class="footnotes"><hr><ol><li id="ref1"><p>Thing&nbsp;<a href="#supref1" rev="footnote">↩</a></p></li><li id="ref2"><p>Another Thing&nbsp;<a href="#supref2" rev="footnote">↩</a></p></li></ol></div>'
+/// markdown test
+///
+/// this is a [link].
+///
+/// [link]: https://example.com "this is a title"
+///
+/// hard break:
+/// after hard break
+///
+/// -----------
+///
+/// a footnote[^footnote].
+///
+/// another footnote[^footnotebis].
+///
+/// [^footnote]: Thing
+///
+///
+/// [^footnotebis]: Another Thing
+///
+///
+/// ![Rust](https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png)
+#[deprecated(note = "Struct<T>")]
+pub fn f() {}