Skip to content

Commit

Permalink
Add test to ensure tables are not inside items summary
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jul 21, 2021
1 parent f423ef5 commit de25b1c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/rustdoc-gui/item-summary-table.goml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This test ensures that <table> elements aren't display in items summary.
goto: file://|DOC_PATH|/lib2/summary_table/index.html
// We check that we picked the right item first.
assert-text: (".item-table .item-left", "Foo")
// Then we check that its summary is empty.
assert-text: (".item-table .item-right", "")
7 changes: 7 additions & 0 deletions src/test/rustdoc-gui/src/lib2/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,10 @@ pub mod long_table {
/// I wanna sqdkfnqds f dsqf qds f dsqf dsq f dsq f qds f qds f qds f dsqq f dsf sqdf dsq fds f dsq f dq f ds fq sd fqds f dsq f sqd fsq df sd fdsqfqsd fdsq f dsq f dsqfd s dfq
pub struct Foo;
}

pub mod summary_table {
/// | header 1 | header 2 |
/// | -------- | -------- |
/// | content | content |
pub struct Foo;
}

0 comments on commit de25b1c

Please sign in to comment.