Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tontyna committed Oct 23, 2019
1 parent d0eeeba commit f0a432f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions weasyprint/tests/test_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""

from ..css.properties import KNOWN_PROPERTIES
from .test_boxes import render_pages as parse


Expand Down Expand Up @@ -95,3 +96,15 @@ def test_variable_initial():
body, = html.children
paragraph, = body.children
assert paragraph.width == 10


def test_variable_fallback():
parse('''
<style>
div {
--var: improperValue;
%s
}
</style>
<div></div>
''' % ''.join(name + ': var(--var);\n' for name in KNOWN_PROPERTIES))

0 comments on commit f0a432f

Please sign in to comment.