Skip to content

Commit

Permalink
add failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades committed Aug 19, 2024
1 parent e686a8f commit 7674b54
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,9 @@ where
Ok(())
}
TagEnd::Strikethrough => formatter.write_str("~~"),
TagEnd::DefinitionList => todo!(),
TagEnd::DefinitionListTitle => todo!(),
TagEnd::DefinitionListDefinition => todo!(),
TagEnd::DefinitionList => Ok(()),
TagEnd::DefinitionListTitle => Ok(()),
TagEnd::DefinitionListDefinition => Ok(()),
},
HardBreak => formatter.write_str(" \n").and(padding(formatter, &state.padding)),
SoftBreak => formatter.write_char('\n').and(padding(formatter, &state.padding)),
Expand Down
18 changes: 18 additions & 0 deletions tests/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1503,3 +1503,21 @@ key = value2
}
}
}

mod definition_list {
use super::assert_events_eq;

#[test]
fn round_trip() {
let input = r"
First Term
: This is the definition of the first term.
Second Term
: This is one definition of the second term.
: This is another definition of the second term.
";

assert_events_eq(input);
}
}

0 comments on commit 7674b54

Please sign in to comment.