diff options
Diffstat (limited to 'src/parser/tests.rs')
| -rw-r--r-- | src/parser/tests.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/parser/tests.rs b/src/parser/tests.rs index 6b37b07..243cb26 100644 --- a/src/parser/tests.rs +++ b/src/parser/tests.rs @@ -73,7 +73,38 @@ fn two_targets() { ]), ] }; +} + +#[test] +fn admonitions() { + parses_to! { + parser: RstParser, + input: "\ +.. note:: In line + Next line +.. admonition:: + Just next line + +.. danger:: Just this line +", + rule: Rule::document, + tokens: [ + admonition(0, 31, [ + admonition_type(3, 7), + line(9, 18), + paragraph(21, 31, [ line(21, 31) ]), + ]), + admonition(31, 66, [ + admonition_type(34, 44), + paragraph(51, 66, [ line(51, 66) ]), + ]), + admonition(67, 94, [ + admonition_type(70, 76), + line(78, 94), + ]), + ] + }; } #[test] |
