diff options
Diffstat (limited to 'src/parser/tests.rs')
| -rw-r--r-- | src/parser/tests.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/parser/tests.rs b/src/parser/tests.rs index ee33c8a..075b750 100644 --- a/src/parser/tests.rs +++ b/src/parser/tests.rs @@ -134,6 +134,32 @@ A |subst| in-line }; } + +#[allow(clippy::cognitive_complexity)] +#[test] +fn substitution_image() { + parses_to! { + parser: RstParser, + input: "\ +.. |subst| image:: thing.png + :target: foo.html +", + rule: Rule::document, + tokens: [ + substitution_def(0, 50, [ + substitution_name(4, 9), + image(11, 50, [ + line(18, 29, [ str(18, 28) ]), + image_option(32, 50, [ + image_opt_name(33, 39), + line(40, 50, [ str(40, 49) ]), + ]), + ]), + ]), + ] + }; +} + // TODO: test images #[allow(clippy::cognitive_complexity)] |
