from schickmacher.renderer.templatetags.extra_filters import escape_css_content

# we use the padded 6 digit css escape sequences
# https://www.w3.org/International/questions/qa-escapes
def test_css_content():
    assert escape_css_content("head\"tail") == "head\\000022tail"
    assert escape_css_content("head\'tail") == "head\\000027tail"
    assert escape_css_content("head\\tail") == "head\\00005Ctail"
    assert escape_css_content("head\ntail") == "head\\00000Atail"
    assert escape_css_content("\"\"") == "\\000022\\000022"
    assert escape_css_content("\\\\") == "\\00005C\\00005C"
    assert escape_css_content("ABCD1234<li>") == "ABCD1234<li>"
