about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2021-09-08 15:09:47 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2021-09-08 15:09:47 +0200
commit021b8ff8bd3d351f098847c3507ffb2c6c722aa3 (patch)
tree92f8b4afd74786dc70cacf977e6c489b0a0b925a /src/test/rustdoc
parent32188d77ed8671f280722f72555c34d1bd096a86 (diff)
Add tests to ensure that <table> don't break doc blocks width anymore
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/table-in-docblock.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/rustdoc/table-in-docblock.rs b/src/test/rustdoc/table-in-docblock.rs
new file mode 100644
index 00000000000..858b589196e
--- /dev/null
+++ b/src/test/rustdoc/table-in-docblock.rs
@@ -0,0 +1,16 @@
+#![crate_name = "foo"]
+
+// @has foo/struct.Foo.html
+// @count - '//*[@class="docblock"]/div/table' 2
+// @!has - '//*[@class="docblock"]/table'
+/// | hello | hello2 |
+/// | ----- | ------ |
+/// | data  | data2  |
+pub struct Foo;
+
+impl Foo {
+    /// | hello | hello2 |
+    /// | ----- | ------ |
+    /// | data  | data2  |
+    pub fn foo(&self) {}
+}