Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
(cherry picked from commit d3f75eb)
  • Loading branch information
bugadani authored and cuviper committed Mar 10, 2021
1 parent 0e214ca commit 3ad36d2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/librustdoc/html/render/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ fn test_name_sorting() {
sorted.sort_by(|&l, r| compare_names(l, r));
assert_eq!(names, sorted);
}

#[test]
fn test_all_types_prints_header_once() {
// Regression test for #82477
let all_types = AllTypes::new();

let mut buffer = Buffer::new();
all_types.print(&mut buffer);

assert_eq!(1, buffer.into_inner().matches("List of all items").count());
}

0 comments on commit 3ad36d2

Please sign in to comment.