Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions tests/draft2019-09/const.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,5 +383,49 @@
"valid": false
}
]
},
{
"description": "characters with the same visual representation but different codepoint",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"const": "μ",
"$comment": "U+03BC"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "μ",
"comment": "U+03BC",
"valid": true
},
{
"description": "character looks the same but uses a different codepoint",
"data": "µ",
"comment": "U+00B5",
"valid": false
}
]
},
{
"description": "characters with the same visual representation, but different number of codepoints",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"const": "ä",
"$comment": "U+00E4"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "ä",
"comment": "U+00E4",
"valid": true
},
{
"description": "character looks the same but uses combining marks",
"data": "ä",
"comment": "a, U+0308",
"valid": false
}
]
}
]
44 changes: 44 additions & 0 deletions tests/draft2020-12/const.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,5 +383,49 @@
"valid": false
}
]
},
{
"description": "characters with the same visual representation but different codepoint",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": "μ",
"$comment": "U+03BC"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "μ",
"comment": "U+03BC",
"valid": true
},
{
"description": "character looks the same but uses a different codepoint",
"data": "µ",
"comment": "U+00B5",
"valid": false
}
]
},
{
"description": "characters with the same visual representation, but different number of codepoints",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"const": "ä",
"$comment": "U+00E4"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "ä",
"comment": "U+00E4",
"valid": true
},
{
"description": "character looks the same but uses combining marks",
"data": "ä",
"comment": "a, U+0308",
"valid": false
}
]
}
]
42 changes: 42 additions & 0 deletions tests/draft4/enum.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,5 +316,47 @@
"valid": false
}
]
},
{
"description": "characters with the same visual representation but different codepoint",
"schema": {
"enum": ["μ"],
"$comment": "U+03BC"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "μ",
"comment": "U+03BC",
"valid": true
},
{
"description": "character looks the same but uses a different codepoint",
"data": "µ",
"comment": "U+00B5",
"valid": false
}
]
},
{
"description": "characters with the same visual representation, but different number of codepoints",
"schema": {
"enum": ["ä"],
"$comment": "U+00E4"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "ä",
"comment": "U+00E4",
"valid": true
},
{
"description": "character looks the same but uses combining marks",
"data": "ä",
"comment": "a, U+0308",
"valid": false
}
]
}
]
42 changes: 42 additions & 0 deletions tests/draft6/const.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,5 +338,47 @@
"valid": false
}
]
},
{
"description": "characters with the same visual representation but different codepoint",
"schema": {
"const": "μ",
"$comment": "U+03BC"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "μ",
"comment": "U+03BC",
"valid": true
},
{
"description": "character looks the same but uses a different codepoint",
"data": "µ",
"comment": "U+00B5",
"valid": false
}
]
},
{
"description": "characters with the same visual representation, but different number of codepoints",
"schema": {
"const": "ä",
"$comment": "U+00E4"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "ä",
"comment": "U+00E4",
"valid": true
},
{
"description": "character looks the same but uses combining marks",
"data": "ä",
"comment": "a, U+0308",
"valid": false
}
]
}
]
42 changes: 42 additions & 0 deletions tests/draft7/const.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,5 +338,47 @@
"valid": false
}
]
},
{
"description": "characters with the same visual representation but different codepoint",
"schema": {
"const": "μ",
"$comment": "U+03BC"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "μ",
"comment": "U+03BC",
"valid": true
},
{
"description": "character looks the same but uses a different codepoint",
"data": "µ",
"comment": "U+00B5",
"valid": false
}
]
},
{
"description": "characters with the same visual representation, but different number of codepoints",
"schema": {
"const": "ä",
"$comment": "U+00E4"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "ä",
"comment": "U+00E4",
"valid": true
},
{
"description": "character looks the same but uses combining marks",
"data": "ä",
"comment": "a, U+0308",
"valid": false
}
]
}
]
44 changes: 44 additions & 0 deletions tests/v1/const.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,5 +383,49 @@
"valid": false
}
]
},
{
"description": "characters with the same visual representation but different codepoint",
"schema": {
"$schema": "https://json-schema.org/v1",
"const": "μ",
"$comment": "U+03BC"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "μ",
"comment": "U+03BC",
"valid": true
},
{
"description": "character looks the same but uses a different codepoint",
"data": "µ",
"comment": "U+00B5",
"valid": false
}
]
},
{
"description": "characters with the same visual representation, but different number of codepoints",
"schema": {
"$schema": "https://json-schema.org/v1",
"const": "ä",
"$comment": "U+00E4"
},
"tests": [
{
"description": "character uses the same codepoint",
"data": "ä",
"comment": "U+00E4",
"valid": true
},
{
"description": "character looks the same but uses combining marks",
"data": "ä",
"comment": "a, U+0308",
"valid": false
}
]
}
]
Loading