Shopify / liquid-c

Liquid performance extension in C.
MIT License
119 stars 24 forks source link

Update utf-8 validity tests to account for liquid checking encoding #219

Closed zachmccormick closed 5 months ago

zachmccormick commented 5 months ago

https://github.com/Shopify/liquid/pull/1774 introduced a pre-parsing check for valid UTF-8 encoding, and https://github.com/Shopify/liquid/pull/1776 changed the raised exception to Liquid::TemplateEncodingError. This updates the failing test to look for the proper exception and message.

It may also be a valid outcome to remove this test entirely since this behavior is really part of https://github.com/Shopify/liquid and not the c extension

ggmichaelgo commented 5 months ago

Hello @zachmccormick ! As you described on your PR, we could just remove test_invalid_utf8_sequence test. Since the Liquid no longer allows templates with invalid UTF-8 byte sequence, this test is now obsolete.

ggmichaelgo commented 5 months ago

Closing this PR since https://github.com/Shopify/liquid-c/pull/220 has been merged!