@traqula/test-utils 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/package.json +2 -2
  2. package/statics/algebra/algebra/sparql12/codepoint-esc-05.json +38 -0
  3. package/statics/algebra/algebra/sparql12/codepoint-esc-06.json +38 -0
  4. package/statics/algebra/algebra/sparql12/codepoint-esc-07.json +38 -0
  5. package/statics/algebra/algebra/sparql12/select-variable-reuse.json +137 -0
  6. package/statics/algebra/algebra-blank-to-var/sparql12/codepoint-esc-05.json +38 -0
  7. package/statics/algebra/algebra-blank-to-var/sparql12/codepoint-esc-06.json +38 -0
  8. package/statics/algebra/algebra-blank-to-var/sparql12/codepoint-esc-07.json +38 -0
  9. package/statics/algebra/algebra-blank-to-var/sparql12/select-variable-reuse.json +137 -0
  10. package/statics/algebra/canonical-sparql/base/sparql12/codepoint-esc-05.sparql +3 -0
  11. package/statics/algebra/canonical-sparql/base/sparql12/codepoint-esc-06.sparql +3 -0
  12. package/statics/algebra/canonical-sparql/base/sparql12/codepoint-esc-07.sparql +3 -0
  13. package/statics/algebra/canonical-sparql/base/sparql12/select-variable-reuse.sparql +8 -0
  14. package/statics/algebra/canonical-sparql/blank-to-var/sparql12/codepoint-esc-05.sparql +3 -0
  15. package/statics/algebra/canonical-sparql/blank-to-var/sparql12/codepoint-esc-06.sparql +3 -0
  16. package/statics/algebra/canonical-sparql/blank-to-var/sparql12/codepoint-esc-07.sparql +3 -0
  17. package/statics/algebra/canonical-sparql/blank-to-var/sparql12/select-variable-reuse.sparql +8 -0
  18. package/statics/algebra/sparql/sparql12/codepoint-esc-05.sparql +6 -0
  19. package/statics/algebra/sparql/sparql12/codepoint-esc-06.sparql +6 -0
  20. package/statics/algebra/sparql/sparql12/codepoint-esc-07.sparql +6 -0
  21. package/statics/algebra/sparql/sparql12/select-variable-reuse.sparql +3 -0
  22. package/statics/ast/ast-source-tracked/sparql-1-1/note-as-var-not-in-term-subquery.json +166 -0
  23. package/statics/ast/ast-source-tracked/sparql-1-1/note-as-var-not-in-wildcard-subquery.json +164 -0
  24. package/statics/ast/ast-source-tracked/sparql-1-1/note-expression-grouped-var.json +169 -0
  25. package/statics/ast/ast-source-tracked/sparql-1-2/codepoint-esc-05.json +97 -0
  26. package/statics/ast/ast-source-tracked/sparql-1-2/codepoint-esc-06.json +97 -0
  27. package/statics/ast/ast-source-tracked/sparql-1-2/codepoint-esc-07.json +97 -0
  28. package/statics/ast/ast-source-tracked/sparql-1-2/select-variable-reuse.json +243 -0
  29. package/statics/ast/sparql/sparql-1-1/note-as-var-not-in-term-subquery.sparql +1 -0
  30. package/statics/ast/sparql/sparql-1-1/note-as-var-not-in-wildcard-subquery.sparql +1 -0
  31. package/statics/ast/sparql/sparql-1-1/note-expression-grouped-var.sparql +1 -0
  32. package/statics/ast/sparql/sparql-1-1-invalid/count-with-ungrouped-expression-variable.sparql +1 -0
  33. package/statics/ast/sparql/sparql-1-1-invalid/select-star-with-group-by.sparql +1 -0
  34. package/statics/ast/sparql/sparql-1-1-invalid/ungrouped-variable-in-expression-projection.sparql +1 -0
  35. package/statics/ast/sparql/sparql-1-2/codepoint-esc-05.sparql +6 -0
  36. package/statics/ast/sparql/sparql-1-2/codepoint-esc-06.sparql +6 -0
  37. package/statics/ast/sparql/sparql-1-2/codepoint-esc-07.sparql +6 -0
  38. package/statics/ast/sparql/sparql-1-2/select-variable-reuse.sparql +3 -0
  39. package/statics/ast/sparql/sparql-1-2-invalid/codepoint-esc-01-bad.sparql +2 -0
  40. package/statics/ast/sparql/sparql-1-2-invalid/codepoint-esc-02-bad.sparql +5 -0
  41. package/statics/ast/sparql/sparql-1-2-invalid/codepoint-esc-03-bad.sparql +6 -0
  42. package/statics/ast/sparql/sparql-1-2-invalid/codepoint-esc-04-bad.sparql +7 -0
  43. package/statics/ast/sparql/sparql-1-2-invalid/codepoint-esc-05-bad.sparql +5 -0
  44. package/statics/ast/sparql/sparql-1-2-invalid/codepoint-esc-06-bad.sparql +5 -0
  45. package/statics/ast/sparql/sparql-1-2-invalid/surrogate-esc-01-bad.sparql +5 -0
  46. package/statics/ast/sparql/sparql-1-2-invalid/surrogate-esc-02-bad.sparql +5 -0
  47. package/statics/ast/sparql/sparql-1-2-invalid/surrogate-esc-03-bad.sparql +5 -0
  48. package/statics/ast/sparql/sparql-1-2-invalid/surrogate-esc-04-bad.sparql +5 -0
  49. package/statics/ast/sparql/sparql-1-2-invalid/surrogate-esc-05-bad.sparql +5 -0
  50. package/statics/ast/sparql-generated/sparql-1-1/note-as-var-not-in-term-subquery.sparql +5 -0
  51. package/statics/ast/sparql-generated/sparql-1-1/note-as-var-not-in-wildcard-subquery.sparql +5 -0
  52. package/statics/ast/sparql-generated/sparql-1-1/note-expression-grouped-var.sparql +4 -0
  53. package/statics/ast/sparql-generated/sparql-1-2/codepoint-esc-05.sparql +3 -0
  54. package/statics/ast/sparql-generated/sparql-1-2/codepoint-esc-06.sparql +3 -0
  55. package/statics/ast/sparql-generated/sparql-1-2/codepoint-esc-07.sparql +3 -0
  56. package/statics/ast/sparql-generated/sparql-1-2/select-variable-reuse.sparql +8 -0
  57. package/statics/ast/sparql-generated-compact/sparql-1-1/note-as-var-not-in-term-subquery.sparql +1 -0
  58. package/statics/ast/sparql-generated-compact/sparql-1-1/note-as-var-not-in-wildcard-subquery.sparql +1 -0
  59. package/statics/ast/sparql-generated-compact/sparql-1-1/note-expression-grouped-var.sparql +1 -0
  60. package/statics/ast/sparql-generated-compact/sparql-1-2/codepoint-esc-05.sparql +1 -0
  61. package/statics/ast/sparql-generated-compact/sparql-1-2/codepoint-esc-06.sparql +1 -0
  62. package/statics/ast/sparql-generated-compact/sparql-1-2/codepoint-esc-07.sparql +1 -0
  63. package/statics/ast/sparql-generated-compact/sparql-1-2/select-variable-reuse.sparql +1 -0
@@ -0,0 +1,97 @@
1
+ {
2
+ "context": [],
3
+ "subType": "select",
4
+ "where": {
5
+ "type": "pattern",
6
+ "subType": "group",
7
+ "patterns": [
8
+ {
9
+ "type": "pattern",
10
+ "subType": "bgp",
11
+ "triples": [
12
+ {
13
+ "type": "triple",
14
+ "subject": {
15
+ "type": "term",
16
+ "subType": "namedNode",
17
+ "value": "http://example/abc",
18
+ "loc": {
19
+ "sourceLocationType": "source",
20
+ "start": 56,
21
+ "end": 76
22
+ }
23
+ },
24
+ "predicate": {
25
+ "type": "term",
26
+ "subType": "variable",
27
+ "value": "p",
28
+ "loc": {
29
+ "sourceLocationType": "source",
30
+ "start": 77,
31
+ "end": 79
32
+ }
33
+ },
34
+ "object": {
35
+ "type": "term",
36
+ "subType": "literal",
37
+ "value": "abc",
38
+ "loc": {
39
+ "sourceLocationType": "source",
40
+ "start": 80,
41
+ "end": 108
42
+ }
43
+ },
44
+ "annotations": [],
45
+ "loc": {
46
+ "sourceLocationType": "source",
47
+ "start": 56,
48
+ "end": 108
49
+ }
50
+ }
51
+ ],
52
+ "loc": {
53
+ "sourceLocationType": "source",
54
+ "start": 56,
55
+ "end": 110
56
+ }
57
+ }
58
+ ],
59
+ "loc": {
60
+ "sourceLocationType": "source",
61
+ "start": 41,
62
+ "end": 112
63
+ }
64
+ },
65
+ "solutionModifiers": {},
66
+ "datasets": {
67
+ "type": "datasetClauses",
68
+ "clauses": [],
69
+ "loc": {
70
+ "sourceLocationType": "noMaterialize"
71
+ }
72
+ },
73
+ "variables": [
74
+ {
75
+ "type": "wildcard",
76
+ "loc": {
77
+ "sourceLocationType": "source",
78
+ "start": 39,
79
+ "end": 40
80
+ }
81
+ }
82
+ ],
83
+ "loc": {
84
+ "sourceLocationType": "inlinedSource",
85
+ "newSource": "# Codepoint escape in a string\n\nSELECT * {\n ## 'abc'\n <http://example/abc> ?p '\\U00000061\\u0062\\U00000063' .\n}\n",
86
+ "start": 0,
87
+ "end": 9007199254740991,
88
+ "loc": {
89
+ "sourceLocationType": "source",
90
+ "start": 32,
91
+ "end": 112
92
+ },
93
+ "startOnNew": 32,
94
+ "endOnNew": 112
95
+ },
96
+ "type": "query"
97
+ }
@@ -0,0 +1,243 @@
1
+ {
2
+ "context": [],
3
+ "subType": "select",
4
+ "where": {
5
+ "type": "pattern",
6
+ "subType": "group",
7
+ "patterns": [
8
+ {
9
+ "type": "pattern",
10
+ "subType": "values",
11
+ "variables": [
12
+ {
13
+ "type": "term",
14
+ "subType": "variable",
15
+ "value": "v",
16
+ "loc": {
17
+ "sourceLocationType": "source",
18
+ "start": 76,
19
+ "end": 78
20
+ }
21
+ }
22
+ ],
23
+ "values": [
24
+ {
25
+ "v": {
26
+ "type": "term",
27
+ "subType": "literal",
28
+ "value": "0",
29
+ "langOrIri": {
30
+ "type": "term",
31
+ "subType": "namedNode",
32
+ "value": "http://www.w3.org/2001/XMLSchema#integer",
33
+ "loc": {
34
+ "sourceLocationType": "noMaterialize"
35
+ }
36
+ },
37
+ "loc": {
38
+ "sourceLocationType": "source",
39
+ "start": 81,
40
+ "end": 82
41
+ }
42
+ }
43
+ },
44
+ {
45
+ "v": {
46
+ "type": "term",
47
+ "subType": "literal",
48
+ "value": "1",
49
+ "langOrIri": {
50
+ "type": "term",
51
+ "subType": "namedNode",
52
+ "value": "http://www.w3.org/2001/XMLSchema#integer",
53
+ "loc": {
54
+ "sourceLocationType": "noMaterialize"
55
+ }
56
+ },
57
+ "loc": {
58
+ "sourceLocationType": "source",
59
+ "start": 83,
60
+ "end": 84
61
+ }
62
+ }
63
+ },
64
+ {
65
+ "v": {
66
+ "type": "term",
67
+ "subType": "literal",
68
+ "value": "2",
69
+ "langOrIri": {
70
+ "type": "term",
71
+ "subType": "namedNode",
72
+ "value": "http://www.w3.org/2001/XMLSchema#integer",
73
+ "loc": {
74
+ "sourceLocationType": "noMaterialize"
75
+ }
76
+ },
77
+ "loc": {
78
+ "sourceLocationType": "source",
79
+ "start": 85,
80
+ "end": 86
81
+ }
82
+ }
83
+ },
84
+ {
85
+ "v": {
86
+ "type": "term",
87
+ "subType": "literal",
88
+ "value": "3",
89
+ "langOrIri": {
90
+ "type": "term",
91
+ "subType": "namedNode",
92
+ "value": "http://www.w3.org/2001/XMLSchema#integer",
93
+ "loc": {
94
+ "sourceLocationType": "noMaterialize"
95
+ }
96
+ },
97
+ "loc": {
98
+ "sourceLocationType": "source",
99
+ "start": 87,
100
+ "end": 88
101
+ }
102
+ }
103
+ }
104
+ ],
105
+ "loc": {
106
+ "sourceLocationType": "source",
107
+ "start": 69,
108
+ "end": 90
109
+ }
110
+ }
111
+ ],
112
+ "loc": {
113
+ "sourceLocationType": "source",
114
+ "start": 65,
115
+ "end": 92
116
+ }
117
+ },
118
+ "solutionModifiers": {},
119
+ "datasets": {
120
+ "type": "datasetClauses",
121
+ "clauses": [],
122
+ "loc": {
123
+ "sourceLocationType": "noMaterialize"
124
+ }
125
+ },
126
+ "variables": [
127
+ {
128
+ "type": "pattern",
129
+ "subType": "bind",
130
+ "expression": {
131
+ "type": "expression",
132
+ "subType": "aggregate",
133
+ "aggregation": "count",
134
+ "distinct": false,
135
+ "loc": {
136
+ "sourceLocationType": "source",
137
+ "start": 8,
138
+ "end": 17
139
+ },
140
+ "expression": [
141
+ {
142
+ "type": "term",
143
+ "subType": "variable",
144
+ "value": "v",
145
+ "loc": {
146
+ "sourceLocationType": "source",
147
+ "start": 14,
148
+ "end": 16
149
+ }
150
+ }
151
+ ]
152
+ },
153
+ "variable": {
154
+ "type": "term",
155
+ "subType": "variable",
156
+ "value": "count",
157
+ "loc": {
158
+ "sourceLocationType": "source",
159
+ "start": 21,
160
+ "end": 27
161
+ }
162
+ },
163
+ "loc": {
164
+ "sourceLocationType": "source",
165
+ "start": 7,
166
+ "end": 28
167
+ }
168
+ },
169
+ {
170
+ "type": "pattern",
171
+ "subType": "bind",
172
+ "expression": {
173
+ "type": "expression",
174
+ "subType": "operation",
175
+ "operator": "+",
176
+ "args": [
177
+ {
178
+ "type": "term",
179
+ "subType": "variable",
180
+ "value": "count",
181
+ "loc": {
182
+ "sourceLocationType": "source",
183
+ "start": 30,
184
+ "end": 36
185
+ }
186
+ },
187
+ {
188
+ "type": "term",
189
+ "subType": "literal",
190
+ "value": "1",
191
+ "langOrIri": {
192
+ "type": "term",
193
+ "subType": "namedNode",
194
+ "value": "http://www.w3.org/2001/XMLSchema#integer",
195
+ "loc": {
196
+ "sourceLocationType": "noMaterialize"
197
+ }
198
+ },
199
+ "loc": {
200
+ "sourceLocationType": "source",
201
+ "start": 39,
202
+ "end": 40
203
+ }
204
+ }
205
+ ],
206
+ "loc": {
207
+ "sourceLocationType": "source",
208
+ "start": 30,
209
+ "end": 40
210
+ }
211
+ },
212
+ "variable": {
213
+ "type": "term",
214
+ "subType": "variable",
215
+ "value": "countPlusOne",
216
+ "loc": {
217
+ "sourceLocationType": "source",
218
+ "start": 44,
219
+ "end": 57
220
+ }
221
+ },
222
+ "loc": {
223
+ "sourceLocationType": "source",
224
+ "start": 29,
225
+ "end": 58
226
+ }
227
+ }
228
+ ],
229
+ "loc": {
230
+ "sourceLocationType": "inlinedSource",
231
+ "newSource": "SELECT (COUNT(?v) AS ?count) (?count + 1 AS ?countPlusOne) WHERE {\n VALUES ?v { 0 1 2 3 }\n}",
232
+ "start": 0,
233
+ "end": 9007199254740991,
234
+ "loc": {
235
+ "sourceLocationType": "source",
236
+ "start": 0,
237
+ "end": 92
238
+ },
239
+ "startOnNew": 0,
240
+ "endOnNew": 92
241
+ },
242
+ "type": "query"
243
+ }
@@ -0,0 +1 @@
1
+ SELECT (1 AS ?x) WHERE { SELECT ?y WHERE { ?y ?p ?o } }
@@ -0,0 +1 @@
1
+ SELECT (1 AS ?x) WHERE { SELECT * WHERE { ?s ?p ?o } }
@@ -0,0 +1 @@
1
+ SELECT (?x + 1 AS ?result) WHERE { ?s ?p ?x } GROUP BY ?x
@@ -0,0 +1 @@
1
+ SELECT (COUNT(?y) AS ?cnt) (?y + 1 AS ?result) WHERE { ?s ?p ?y }
@@ -0,0 +1 @@
1
+ SELECT * WHERE { ?s ?p ?o } GROUP BY ?s
@@ -0,0 +1 @@
1
+ SELECT (?y + 1 AS ?result) WHERE { ?s ?p ?y } GROUP BY ?s
@@ -0,0 +1,6 @@
1
+ # Codepoint escape in an IRI
2
+
3
+ SELECT * {
4
+ ## /abc
5
+ <http://example/\u0061\U00000062\u0063> ?p ?o .
6
+ }
@@ -0,0 +1,6 @@
1
+ # Codepoint escape in a string
2
+
3
+ SELECT * {
4
+ ## "abc"
5
+ <http://example/abc> ?p "\U00000061\u0062\U00000063" .
6
+ }
@@ -0,0 +1,6 @@
1
+ # Codepoint escape in a string
2
+
3
+ SELECT * {
4
+ ## 'abc'
5
+ <http://example/abc> ?p '\U00000061\u0062\U00000063' .
6
+ }
@@ -0,0 +1,3 @@
1
+ SELECT (COUNT(?v) AS ?count) (?count + 1 AS ?countPlusOne) WHERE {
2
+ VALUES ?v { 0 1 2 3 }
3
+ }
@@ -0,0 +1,2 @@
1
+ # The query `ASK {}` entirely encoded using codepoint escapes.
2
+ \u0041\u0053\u004B\u0020\u007B\u007D
@@ -0,0 +1,5 @@
1
+ # Codepoint escape in prefixed name : PNAME_NS
2
+
3
+ SELECT * {
4
+ ?x n\0073:abc ?o
5
+ }
@@ -0,0 +1,6 @@
1
+ # Codepoint escape in prefixed name : PN_LOCAL
2
+ PREFIX ns: <http://example/ns#>
3
+
4
+ SELECT * {
5
+ ?x ns:a\u0062c ?o
6
+ }
@@ -0,0 +1,7 @@
1
+ # Codepoint escape in variable
2
+
3
+ PREIFX ns: <http://example/ns#>
4
+
5
+ SELECT * {
6
+ ?a\u0062c ns:abc ?o
7
+ }
@@ -0,0 +1,5 @@
1
+ # \u005C is the UCHAR for \ (backslash). After UCHAR decode the string ends
2
+ # with a lone backslash, which is not a valid ECHAR sequence.
3
+ SELECT * {
4
+ ?s ?p "test\u005C"
5
+ }
@@ -0,0 +1,5 @@
1
+ # \u005C is the UCHAR for \ (backslash). After UCHAR decode the string becomes
2
+ # \x, where x is not a valid ECHAR character.
3
+ SELECT * {
4
+ ?s ?p "\u005Cx"
5
+ }
@@ -0,0 +1,5 @@
1
+ ## Surrogate pair. Not legal.
2
+
3
+ SELECT * {
4
+ ?s ?p "\uD83C\uDCA1" .
5
+ }
@@ -0,0 +1,5 @@
1
+ ## Surrogates. Low-high (not a pair). Not legal.
2
+
3
+ SELECT * {
4
+ ?s ?p "\uDCA1\uD83C" .
5
+ }
@@ -0,0 +1,5 @@
1
+ ## High surrogate. Not legal.
2
+
3
+ SELECT * {
4
+ ?s ?p "Single high surrogate (\uD83C)"
5
+ }
@@ -0,0 +1,5 @@
1
+ ## Low surrogate. Not legal.
2
+
3
+ SELECT * {
4
+ ?s ?p "Single low surrogate (\uDCA1)"
5
+ }
@@ -0,0 +1,5 @@
1
+ ## Surrogate pair in IRI. Not legal.
2
+
3
+ SELECT * {
4
+ ?s ?p <http://example/\uD83C\uDCA1>
5
+ }
@@ -0,0 +1,5 @@
1
+ SELECT ( "1"^^<http://www.w3.org/2001/XMLSchema#integer> AS ?x ) WHERE {
2
+ SELECT ?y WHERE {
3
+ ?y ?p ?o .
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ SELECT ( "1"^^<http://www.w3.org/2001/XMLSchema#integer> AS ?x ) WHERE {
2
+ SELECT * WHERE {
3
+ ?s ?p ?o .
4
+ }
5
+ }
@@ -0,0 +1,4 @@
1
+ SELECT ( ( ?x + "1"^^<http://www.w3.org/2001/XMLSchema#integer> ) AS ?result ) WHERE {
2
+ ?s ?p ?x .
3
+ }
4
+ GROUP BY ?x
@@ -0,0 +1,3 @@
1
+ SELECT * WHERE {
2
+ <http://example/abc> ?p ?o .
3
+ }
@@ -0,0 +1,3 @@
1
+ SELECT * WHERE {
2
+ <http://example/abc> ?p "abc" .
3
+ }
@@ -0,0 +1,3 @@
1
+ SELECT * WHERE {
2
+ <http://example/abc> ?p "abc" .
3
+ }
@@ -0,0 +1,8 @@
1
+ SELECT ( COUNT( ?v ) AS ?count ) ( ( ?count + "1"^^<http://www.w3.org/2001/XMLSchema#integer> ) AS ?countPlusOne ) WHERE {
2
+ VALUES ?v {
3
+ "0"^^<http://www.w3.org/2001/XMLSchema#integer>
4
+ "1"^^<http://www.w3.org/2001/XMLSchema#integer>
5
+ "2"^^<http://www.w3.org/2001/XMLSchema#integer>
6
+ "3"^^<http://www.w3.org/2001/XMLSchema#integer>
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ SELECT ( "1"^^<http://www.w3.org/2001/XMLSchema#integer> AS ?x ) WHERE { SELECT ?y WHERE { ?y ?p ?o . } }
@@ -0,0 +1 @@
1
+ SELECT ( "1"^^<http://www.w3.org/2001/XMLSchema#integer> AS ?x ) WHERE { SELECT * WHERE { ?s ?p ?o . } }
@@ -0,0 +1 @@
1
+ SELECT ( ( ?x + "1"^^<http://www.w3.org/2001/XMLSchema#integer> ) AS ?result ) WHERE { ?s ?p ?x . } GROUP BY ?x
@@ -0,0 +1 @@
1
+ SELECT * WHERE { <http://example/abc> ?p ?o . }
@@ -0,0 +1 @@
1
+ SELECT * WHERE { <http://example/abc> ?p "abc" . }
@@ -0,0 +1 @@
1
+ SELECT * WHERE { <http://example/abc> ?p "abc" . }
@@ -0,0 +1 @@
1
+ SELECT ( COUNT( ?v ) AS ?count ) ( ( ?count + "1"^^<http://www.w3.org/2001/XMLSchema#integer> ) AS ?countPlusOne ) WHERE { VALUES ?v { "0"^^<http://www.w3.org/2001/XMLSchema#integer> "1"^^<http://www.w3.org/2001/XMLSchema#integer> "2"^^<http://www.w3.org/2001/XMLSchema#integer> "3"^^<http://www.w3.org/2001/XMLSchema#integer> } }