Add test
This commit is contained in:
parent
3be69b100f
commit
d3f75ebf60
1 changed files with 11 additions and 0 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue