JSON-Schema-Test-Suite icon indicating copy to clipboard operation
JSON-Schema-Test-Suite copied to clipboard

Add tests to ensure Unicode string comparison is by codepoint - Issue #570

Open zaplapl opened this issue 1 year ago • 2 comments
trafficstars

Commit motivated by discussion with @Julian here

zaplapl avatar Apr 14 '24 10:04 zaplapl

I'm pretty sure we already have these kinds of tests. See minLength and maxLength.

These tests are checking the JSON parser, not JSON Schema.

I can provide links in the morning.

gregsdennis avatar Apr 14 '24 12:04 gregsdennis

thanks for your comment @gregsdennis

as far as I can tell, the test cases you mention are different

to me this highlights that the way length is calculated for strings is different than the spec's directive on establishing identity/equality for strings

the reason I thought to put these cases in the tests for const is that it's the place where it makes the most sense to speak the schema validator evaluating equality for two strings

the issue of length might just be separate - and out of scope for the original issue

that is, it may be an issue (for this test suite) that a schema with a string field with maxLength 1 essentially accepts unbounded zalgo input since that may count as a single grapheme - but that seems like it's a consideration that is out of scope for the issue as it was originally raised - and doesn't affect the (in)correctness of this particular change

but maybe I've misunderstood

zaplapl avatar Apr 20 '24 13:04 zaplapl