diff options
| author | Philipp A | 2019-11-09 19:35:16 +0100 |
|---|---|---|
| committer | Philipp A | 2019-11-09 19:35:16 +0100 |
| commit | 2ddff4fbbfbf4593260b96e57e7f975d2d003714 (patch) | |
| tree | f9aeb61c3f0cf59d44d2e447b00bd5019e188eac /src/parser/tests.rs | |
| parent | 955e179e8e78dfbc5ef9e4e3400413b5351e5d6b (diff) | |
| download | rust-rst-2ddff4fbbfbf4593260b96e57e7f975d2d003714.tar.bz2 | |
Finish substitution implementation
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)] |
