Skip to content

Commit d50e08e

Browse files
committed
init new tests
1 parent a091227 commit d50e08e

14 files changed

Lines changed: 336 additions & 150 deletions

File tree

packages/test-utils/statics/ast/ast-source-tracked/sparql-1-2/codepoint-esc-05.json

Lines changed: 32 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,44 @@
77
"patterns": [
88
{
99
"type": "pattern",
10-
"subType": "bgp",
11-
"triples": [
10+
"subType": "values",
11+
"variables": [
1212
{
13-
"type": "triple",
14-
"subject": {
13+
"type": "term",
14+
"subType": "variable",
15+
"value": "v",
16+
"loc": {
17+
"sourceLocationType": "source",
18+
"start": 21,
19+
"end": 23
20+
}
21+
}
22+
],
23+
"values": [
24+
{
25+
"v": {
1526
"type": "term",
1627
"subType": "namedNode",
17-
"value": "http://example/abc",
18-
"loc": {
19-
"sourceLocationType": "source",
20-
"start": 53,
21-
"end": 92
22-
}
23-
},
24-
"predicate": {
25-
"type": "term",
26-
"subType": "variable",
27-
"value": "p",
28-
"loc": {
29-
"sourceLocationType": "source",
30-
"start": 93,
31-
"end": 95
32-
}
33-
},
34-
"object": {
35-
"type": "term",
36-
"subType": "variable",
37-
"value": "o",
28+
"value": "http://example/abc👾",
3829
"loc": {
3930
"sourceLocationType": "source",
40-
"start": 96,
41-
"end": 98
31+
"start": 42,
32+
"end": 91
4233
}
43-
},
44-
"annotations": [],
45-
"loc": {
46-
"sourceLocationType": "source",
47-
"start": 53,
48-
"end": 98
4934
}
5035
}
5136
],
5237
"loc": {
5338
"sourceLocationType": "source",
54-
"start": 53,
55-
"end": 100
39+
"start": 14,
40+
"end": 95
5641
}
5742
}
5843
],
5944
"loc": {
6045
"sourceLocationType": "source",
61-
"start": 39,
62-
"end": 102
46+
"start": 10,
47+
"end": 97
6348
}
6449
},
6550
"solutionModifiers": {},
@@ -72,26 +57,28 @@
7257
},
7358
"variables": [
7459
{
75-
"type": "wildcard",
60+
"type": "term",
61+
"subType": "variable",
62+
"value": "v",
7663
"loc": {
7764
"sourceLocationType": "source",
78-
"start": 37,
79-
"end": 38
65+
"start": 7,
66+
"end": 9
8067
}
8168
}
8269
],
8370
"loc": {
8471
"sourceLocationType": "inlinedSource",
85-
"newSource": "# Codepoint escape in an IRI\n\nSELECT * {\n ## /abc\n <http://example/\\u0061\\U00000062\\u0063> ?p ?o .\n}\n",
72+
"newSource": "SELECT ?v {\n VALUES ?v {\n # abc👾\n <http://example/\\u0061\\U00000062\\u0063\\U0001F47E>\n }\n}\n",
8673
"start": 0,
8774
"end": 9007199254740991,
8875
"loc": {
8976
"sourceLocationType": "source",
90-
"start": 30,
91-
"end": 102
77+
"start": 0,
78+
"end": 97
9279
},
93-
"startOnNew": 30,
94-
"endOnNew": 102
80+
"startOnNew": 0,
81+
"endOnNew": 97
9582
},
9683
"type": "query"
9784
}

packages/test-utils/statics/ast/ast-source-tracked/sparql-1-2/codepoint-esc-06.json

Lines changed: 32 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,44 @@
77
"patterns": [
88
{
99
"type": "pattern",
10-
"subType": "bgp",
11-
"triples": [
10+
"subType": "values",
11+
"variables": [
1212
{
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": {
13+
"type": "term",
14+
"subType": "variable",
15+
"value": "v",
16+
"loc": {
17+
"sourceLocationType": "source",
18+
"start": 21,
19+
"end": 23
20+
}
21+
}
22+
],
23+
"values": [
24+
{
25+
"v": {
3526
"type": "term",
3627
"subType": "literal",
37-
"value": "abc",
28+
"value": "abc👾",
3829
"loc": {
3930
"sourceLocationType": "source",
40-
"start": 80,
41-
"end": 108
31+
"start": 44,
32+
"end": 82
4233
}
43-
},
44-
"annotations": [],
45-
"loc": {
46-
"sourceLocationType": "source",
47-
"start": 56,
48-
"end": 108
4934
}
5035
}
5136
],
5237
"loc": {
5338
"sourceLocationType": "source",
54-
"start": 56,
55-
"end": 110
39+
"start": 14,
40+
"end": 86
5641
}
5742
}
5843
],
5944
"loc": {
6045
"sourceLocationType": "source",
61-
"start": 41,
62-
"end": 112
46+
"start": 10,
47+
"end": 88
6348
}
6449
},
6550
"solutionModifiers": {},
@@ -72,26 +57,28 @@
7257
},
7358
"variables": [
7459
{
75-
"type": "wildcard",
60+
"type": "term",
61+
"subType": "variable",
62+
"value": "v",
7663
"loc": {
7764
"sourceLocationType": "source",
78-
"start": 39,
79-
"end": 40
65+
"start": 7,
66+
"end": 9
8067
}
8168
}
8269
],
8370
"loc": {
8471
"sourceLocationType": "inlinedSource",
85-
"newSource": "# Codepoint escape in a string\n\nSELECT * {\n ## \"abc\"\n <http://example/abc> ?p \"\\U00000061\\u0062\\U00000063\" .\n}\n",
72+
"newSource": "SELECT ?v {\n VALUES ?v {\n # \"abc👾\"\n \"\\U00000061\\u0062\\U00000063\\U0001F47E\"\n }\n}\n",
8673
"start": 0,
8774
"end": 9007199254740991,
8875
"loc": {
8976
"sourceLocationType": "source",
90-
"start": 32,
91-
"end": 112
77+
"start": 0,
78+
"end": 88
9279
},
93-
"startOnNew": 32,
94-
"endOnNew": 112
80+
"startOnNew": 0,
81+
"endOnNew": 88
9582
},
9683
"type": "query"
9784
}

packages/test-utils/statics/ast/ast-source-tracked/sparql-1-2/codepoint-esc-07.json

Lines changed: 32 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,44 @@
77
"patterns": [
88
{
99
"type": "pattern",
10-
"subType": "bgp",
11-
"triples": [
10+
"subType": "values",
11+
"variables": [
1212
{
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": {
13+
"type": "term",
14+
"subType": "variable",
15+
"value": "v",
16+
"loc": {
17+
"sourceLocationType": "source",
18+
"start": 21,
19+
"end": 23
20+
}
21+
}
22+
],
23+
"values": [
24+
{
25+
"v": {
3526
"type": "term",
3627
"subType": "literal",
37-
"value": "abc",
28+
"value": "abc👾",
3829
"loc": {
3930
"sourceLocationType": "source",
40-
"start": 80,
41-
"end": 108
31+
"start": 44,
32+
"end": 82
4233
}
43-
},
44-
"annotations": [],
45-
"loc": {
46-
"sourceLocationType": "source",
47-
"start": 56,
48-
"end": 108
4934
}
5035
}
5136
],
5237
"loc": {
5338
"sourceLocationType": "source",
54-
"start": 56,
55-
"end": 110
39+
"start": 14,
40+
"end": 86
5641
}
5742
}
5843
],
5944
"loc": {
6045
"sourceLocationType": "source",
61-
"start": 41,
62-
"end": 112
46+
"start": 10,
47+
"end": 88
6348
}
6449
},
6550
"solutionModifiers": {},
@@ -72,26 +57,28 @@
7257
},
7358
"variables": [
7459
{
75-
"type": "wildcard",
60+
"type": "term",
61+
"subType": "variable",
62+
"value": "v",
7663
"loc": {
7764
"sourceLocationType": "source",
78-
"start": 39,
79-
"end": 40
65+
"start": 7,
66+
"end": 9
8067
}
8168
}
8269
],
8370
"loc": {
8471
"sourceLocationType": "inlinedSource",
85-
"newSource": "# Codepoint escape in a string\n\nSELECT * {\n ## 'abc'\n <http://example/abc> ?p '\\U00000061\\u0062\\U00000063' .\n}\n",
72+
"newSource": "SELECT ?v {\n VALUES ?v {\n # \"abc👾\"\n '\\U00000061\\u0062\\U00000063\\U0001F47E'\n }\n}\n",
8673
"start": 0,
8774
"end": 9007199254740991,
8875
"loc": {
8976
"sourceLocationType": "source",
90-
"start": 32,
91-
"end": 112
77+
"start": 0,
78+
"end": 88
9279
},
93-
"startOnNew": 32,
94-
"endOnNew": 112
80+
"startOnNew": 0,
81+
"endOnNew": 88
9582
},
9683
"type": "query"
9784
}

0 commit comments

Comments
 (0)