From 483606e95b8ecc3e31f4621749742cab30494952 Mon Sep 17 00:00:00 2001 From: Oliver Marks Date: Sun, 25 Nov 2018 18:57:39 +0000 Subject: [PATCH] Add test for image with out text field --- tests/test_document_parsing.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_document_parsing.py b/tests/test_document_parsing.py index 7ff42a8..f8695e6 100644 --- a/tests/test_document_parsing.py +++ b/tests/test_document_parsing.py @@ -47,6 +47,13 @@ def test_image(): assert result[1].value == expected[1].value assert result[2].value == expected[2].value + text = "[[../../../images/opengl/point-sprite-shader.png]]" + expected = [ + Token(tokens.IMAGE, ["../../../images/opengl/point-sprite-shader.png", ""]), + ] + result = parse_text(text) + assert result[0].value == expected[0].value + def test_link(): text = "parse link [[../../test.html][test]] after link"