Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Feb 24, 2021
1 parent 3be69b1 commit d3f75eb
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 d3f75eb

Please sign in to comment.