Skip to content

Commit

Permalink
Adds tests on VALUES cardinality validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tpt authored and afs committed Apr 22, 2023
1 parent 4cc89f4 commit 8f53603
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sparql/sparql11/syntax-query/manifest.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@
:test_codepoint_boundaries_04
:test_codepoint_boundaries_escaped_05
:test_codepoint_invalid_escaped_bad_06

:test_bad_values_too_few
:test_bad_values_too_many
) .

:test_1 rdf:type mf:PositiveSyntaxTest11 ;
Expand Down Expand Up @@ -662,3 +665,11 @@
mf:name "\\u unicode codepoint escaping in literal using partial surrogate pair" ;
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" ;
mf:action <syn-invalid-codepoint-escaped-bad-01.rq> ;.

:test_bad_values_too_many rdf:type mf:NegativeSyntaxTest11 ;
mf:name "Too many values in a VALUE clause compared to the number of variables" ;
mf:action <syn-bad-values-too-many.rq> .

:test_bad_values_too_few rdf:type mf:NegativeSyntaxTest11 ;
mf:name "Too few values in a VALUE clause compared to the number of variables" ;
mf:action <syn-bad-values-too-few.rq> .
1 change: 1 addition & 0 deletions sparql/sparql11/syntax-query/syn-bad-values-too-few.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT * WHERE { VALUES (?a ?b) { (1) } }
1 change: 1 addition & 0 deletions sparql/sparql11/syntax-query/syn-bad-values-too-many.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT * WHERE { VALUES (?a ?b) { (1 2 3) } }

0 comments on commit 8f53603

Please sign in to comment.