Skip to content

Commit 86220f3

Browse files
kaseigkellogg
authored andcommitted
Add unicode syntax tests for codepoint bondaries and for invalid surrogate pair codepoints.
1 parent ec4c9e6 commit 86220f3

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SELECT * WHERE {
2+
?s <http://a.example/p1> '€߿ࠀ࿿က쿿퀀퟿�𐀀𿿽񀀀󿿽􀀀􏿽'
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SELECT * WHERE {
2+
?s <http://a.example/p1> '\u0080\u07FF\u0800\u0FFF\u1000\uCFFF\uD000\uD7FF\uE000\uFFFD\U00010000\U0003FFFD\U00040000\U000FFFFD\U00100000\U0010FFFD'
3+
}

sparql11/data-sparql11/syntax-query/manifest.ttl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@
109109
:test_codepoint_escape_03
110110
:test_codepoint_escape_bad_04
111111
:test_codepoint_escape_bad_05
112+
:test_codepoint_boundaries_01
113+
:test_codepoint_boundaries_01_escaped
114+
:test_invalid_codepoint_escaped_bad_01
112115
) .
113116

114117
:test_1 rdf:type mf:PositiveSyntaxTest11 ;
@@ -655,3 +658,19 @@
655658
mf:name "Invalid multi-pass codepoint escaping (\\U then \\u)" ;
656659
mf:description "Unescaping one escape sequence must not produce content that is used in another escape sequence" ;
657660
mf:action <syn-codepoint-escape-bad-05.rq> ;.
661+
662+
:test_codepoint_boundaries_01 rdf:type mf:PositiveSyntaxTest11 ;
663+
dawgt:approval dawgt:Proposed ;
664+
mf:name "utf8 literal using codepoints at notable unicode boundaries" ;
665+
mf:action <1val1STRING_LITERAL1_with_UTF8_boundaries.rq> ;.
666+
667+
:test_codepoint_boundaries_01_escaped rdf:type mf:PositiveSyntaxTest11 ;
668+
dawgt:approval dawgt:Proposed ;
669+
mf:name "\\U and \\u unicode codepoint escaping in literal using codepoints at notable unicode boundaries" ;
670+
mf:action <1val1STRING_LITERAL1_with_UTF8_boundaries_escaped.rq> ;.
671+
672+
:test_invalid_codepoint_escaped_bad_01 rdf:type mf:NegativeSyntaxTest11 ;
673+
dawgt:approval dawgt:Proposed ;
674+
mf:name "\\u unicode codepoint escaping in literal using partial surrogate pair" ;
675+
mf:description "Using a codepoint that is half of a surrogate pair (in the range U+D800–U+DFFF) without a corresponding codepoint is illegal" ;
676+
mf:action <syn-invalid-codepoint-escaped-bad-01.rq> ;.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SELECT * WHERE {
2+
?s <http://a.example/p1> '\uD800'
3+
}

0 commit comments

Comments
 (0)