Skip to content

Commit

Permalink
Add tests for unresolved attributes spacing issue
Browse files Browse the repository at this point in the history
See #37
  • Loading branch information
thibaudcolas committed Mar 13, 2021
1 parent 7528651 commit a612108
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions curlylint/parse_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,21 @@ def test_opening_tag_attributes_no_space(self):
'<a class="govuk-button"href="/cookies">Set cookie preferences</a>'
)

def test_opening_tag_jinja_block_attributes_whitespace_after(self):
opening_tag.parse(
'<form{% if has_file_field %} enctype="multipart/form-data"{% endif %} action="{{ form_url }}">'
)

@pytest.mark.skip(reason="no way of currently testing this")
def test_opening_tag_jinja_block_attributes_whitespace_before_37(self):
# https://github.com/thibaudcolas/curlylint/issues/37
opening_tag.parse(
'<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}">'
)

def test_closing_tag():
closing_tag = make_closing_tag_parser(P.string("div"))
assert closing_tag.parse("</div>") == ClosingTag(name="div")
def test_closing_tag(self):
closing_tag = make_closing_tag_parser(P.string("div"))
self.assertEqual(closing_tag.parse("</div>"), ClosingTag(name="div"))


def test_raw_text_elements():
Expand Down

0 comments on commit a612108

Please sign in to comment.