about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2020-09-15 16:18:05 -0700
committerCamelid <camelidcamel@gmail.com>2021-02-07 19:57:53 -0800
commita0f9d4beec3a89eec88289701c152a69d488487b (patch)
tree8e1e0bb9048394b8f435b4fd9b004c50c2c4b765 /src/test/rustdoc
parentbb587b1a1737738658d2eaecd4c8c1cab555257a (diff)
downloadrust-a0f9d4beec3a89eec88289701c152a69d488487b.tar.gz
rust-a0f9d4beec3a89eec88289701c152a69d488487b.zip
Enable smart punctuation
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/inline_cross/add-docs.rs2
-rw-r--r--src/test/rustdoc/smart-punct.rs13
2 files changed, 14 insertions, 1 deletions
diff --git a/src/test/rustdoc/inline_cross/add-docs.rs b/src/test/rustdoc/inline_cross/add-docs.rs
index 1af5e8f03b4..8f0c4e5e641 100644
--- a/src/test/rustdoc/inline_cross/add-docs.rs
+++ b/src/test/rustdoc/inline_cross/add-docs.rs
@@ -4,6 +4,6 @@ extern crate inner;
 
 
 // @has add_docs/struct.MyStruct.html
-// @has add_docs/struct.MyStruct.html "Doc comment from 'pub use', Doc comment from definition"
+// @has add_docs/struct.MyStruct.html "Doc comment from ‘pub use’, Doc comment from definition"
 /// Doc comment from 'pub use',
 pub use inner::MyStruct;
diff --git a/src/test/rustdoc/smart-punct.rs b/src/test/rustdoc/smart-punct.rs
new file mode 100644
index 00000000000..5c4530c97a9
--- /dev/null
+++ b/src/test/rustdoc/smart-punct.rs
@@ -0,0 +1,13 @@
+#![crate_name = "foo"]
+
+//! This is the "start" of the 'document'! How'd you know that "it's" the start?
+//!
+//! # Header with "smart punct'"
+//!
+//! [link with "smart punct'" -- yessiree!][]
+//!
+//! [link with "smart punct'" -- yessiree!]: https://www.rust-lang.org
+
+// @has "foo/index.html" "//p" "This is the “start” of the ‘document’! How’d you know that “it’s” the start?"
+// @has "foo/index.html" "//h1" "Header with “smart punct’”"
+// @has "foo/index.html" '//a[@href="https://www.rust-lang.org"]' "link with “smart punct’” – yessiree!"