Skip to content

Commit ed51e97

Browse files
author
Zac Apl
committed
base test implementation for const equality for strings based on evalutaion by individual codepoint
1 parent 57617f2 commit ed51e97

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

tests/draft6/const.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,5 +338,57 @@
338338
"valid": false
339339
}
340340
]
341+
},
342+
{
343+
"description": "graphemes evaluated codepoint-for-codepoint",
344+
"schema": { "const": "μ" },
345+
"tests": [
346+
{
347+
"description": "grapheme is equal for codepoint",
348+
"data": "μ",
349+
"valid": true
350+
},
351+
{
352+
"description": "grapheme is not equal for codepoint",
353+
"data": "µ",
354+
"valid": false
355+
},
356+
{
357+
"description": "codepoint is equal for grapheme",
358+
"data": "\u03bc",
359+
"valid": true
360+
},
361+
{
362+
"description": "codepoint is not equal for grapheme",
363+
"data": "\u00b5",
364+
"valid": false
365+
}
366+
]
367+
},
368+
{
369+
"description": "combining marks evaluated codepoint-for-codepoint",
370+
"schema": { "const": "a\u0308" },
371+
"tests": [
372+
{
373+
"description": "grapheme is equal codepoint-for-codepoint",
374+
"data": "",
375+
"valid": true
376+
},
377+
{
378+
"description": "grapheme is not equal codepoint-for-codepoint",
379+
"data": "ä",
380+
"valid": false
381+
},
382+
{
383+
"description": "codepoints are equal codepoint-for-codepoint",
384+
"data": "\u0061\u0308",
385+
"valid": true
386+
},
387+
{
388+
"description": "codepoints are not equal codepoint-for-codepoint",
389+
"data": "\u00e4",
390+
"valid": false
391+
}
392+
]
341393
}
342394
]

0 commit comments

Comments
 (0)