aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser/tests.rs
diff options
context:
space:
mode:
authorPhilipp A2019-11-09 19:35:16 +0100
committerPhilipp A2019-11-09 19:35:16 +0100
commit2ddff4fbbfbf4593260b96e57e7f975d2d003714 (patch)
treef9aeb61c3f0cf59d44d2e447b00bd5019e188eac /src/parser/tests.rs
parent955e179e8e78dfbc5ef9e4e3400413b5351e5d6b (diff)
downloadrust-rst-2ddff4fbbfbf4593260b96e57e7f975d2d003714.tar.bz2
Finish substitution implementation
Diffstat (limited to 'src/parser/tests.rs')
-rw-r--r--src/parser/tests.rs26
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)]