Skip to content

Commit 2098df6

Browse files
authored
Add ordinal implicit range tests (#988)
1 parent 6f71e72 commit 2098df6

File tree

8 files changed

+200
-0
lines changed

8 files changed

+200
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clear first paint
4+
version: 3
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: ordinalScope
9+
scopeType: {type: customRegex, regex: '[^\s"''`]+'}
10+
start: 0
11+
length: 1
12+
usePrePhraseSnapshot: true
13+
action: {name: clearAndSetSelection}
14+
initialState:
15+
documentContents: aaa-bbb ccc-ddd eee-fff ggg-hhh
16+
selections:
17+
- anchor: {line: 0, character: 11}
18+
active: {line: 0, character: 20}
19+
marks: {}
20+
finalState:
21+
documentContents: aaa-bbb eee-fff ggg-hhh
22+
selections:
23+
- anchor: {line: 0, character: 8}
24+
active: {line: 0, character: 8}
25+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: ordinalScope, scopeType: {type: customRegex, regex: '[^\s"''`]+'}, start: 0, length: 1}]}]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clear first paint
4+
version: 3
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: ordinalScope
9+
scopeType: {type: customRegex, regex: '[^\s"''`]+'}
10+
start: 0
11+
length: 1
12+
usePrePhraseSnapshot: true
13+
action: {name: clearAndSetSelection}
14+
initialState:
15+
documentContents: aaa-bbb ccc-ddd eee-fff ggg-hhh
16+
selections:
17+
- anchor: {line: 0, character: 11}
18+
active: {line: 0, character: 11}
19+
marks: {}
20+
finalState:
21+
documentContents: " ccc-ddd eee-fff ggg-hhh"
22+
selections:
23+
- anchor: {line: 0, character: 0}
24+
active: {line: 0, character: 0}
25+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: ordinalScope, scopeType: {type: customRegex, regex: '[^\s"''`]+'}, start: 0, length: 1}]}]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clear first token
4+
version: 3
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: ordinalScope
9+
scopeType: {type: token}
10+
start: 0
11+
length: 1
12+
usePrePhraseSnapshot: true
13+
action: {name: clearAndSetSelection}
14+
initialState:
15+
documentContents: aaa bbb ccc ddd
16+
selections:
17+
- anchor: {line: 0, character: 5}
18+
active: {line: 0, character: 10}
19+
marks: {}
20+
finalState:
21+
documentContents: aaa ccc ddd
22+
selections:
23+
- anchor: {line: 0, character: 4}
24+
active: {line: 0, character: 4}
25+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: ordinalScope, scopeType: {type: token}, start: 0, length: 1}]}]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clear first token
4+
version: 3
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: ordinalScope
9+
scopeType: {type: token}
10+
start: 0
11+
length: 1
12+
usePrePhraseSnapshot: true
13+
action: {name: clearAndSetSelection}
14+
initialState:
15+
documentContents: aaa bbb ccc ddd
16+
selections:
17+
- anchor: {line: 0, character: 3}
18+
active: {line: 0, character: 8}
19+
marks: {}
20+
finalState:
21+
documentContents: aaa ccc ddd
22+
selections:
23+
- anchor: {line: 0, character: 4}
24+
active: {line: 0, character: 4}
25+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: ordinalScope, scopeType: {type: token}, start: 0, length: 1}]}]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clear last paint
4+
version: 3
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: ordinalScope
9+
scopeType: {type: customRegex, regex: '[^\s"''`]+'}
10+
start: -1
11+
length: 1
12+
usePrePhraseSnapshot: true
13+
action: {name: clearAndSetSelection}
14+
initialState:
15+
documentContents: aaa-bbb ccc-ddd eee-fff ggg-hhh
16+
selections:
17+
- anchor: {line: 0, character: 11}
18+
active: {line: 0, character: 20}
19+
marks: {}
20+
finalState:
21+
documentContents: aaa-bbb ccc-ddd ggg-hhh
22+
selections:
23+
- anchor: {line: 0, character: 16}
24+
active: {line: 0, character: 16}
25+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: ordinalScope, scopeType: {type: customRegex, regex: '[^\s"''`]+'}, start: -1, length: 1}]}]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clear last paint
4+
version: 3
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: ordinalScope
9+
scopeType: {type: customRegex, regex: '[^\s"''`]+'}
10+
start: -1
11+
length: 1
12+
usePrePhraseSnapshot: true
13+
action: {name: clearAndSetSelection}
14+
initialState:
15+
documentContents: aaa-bbb ccc-ddd eee-fff ggg-hhh
16+
selections:
17+
- anchor: {line: 0, character: 11}
18+
active: {line: 0, character: 11}
19+
marks: {}
20+
finalState:
21+
documentContents: "aaa-bbb ccc-ddd eee-fff "
22+
selections:
23+
- anchor: {line: 0, character: 24}
24+
active: {line: 0, character: 24}
25+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: ordinalScope, scopeType: {type: customRegex, regex: '[^\s"''`]+'}, start: -1, length: 1}]}]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clear last token
4+
version: 3
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: ordinalScope
9+
scopeType: {type: token}
10+
start: -1
11+
length: 1
12+
usePrePhraseSnapshot: true
13+
action: {name: clearAndSetSelection}
14+
initialState:
15+
documentContents: aaa bbb ccc ddd
16+
selections:
17+
- anchor: {line: 0, character: 5}
18+
active: {line: 0, character: 10}
19+
marks: {}
20+
finalState:
21+
documentContents: aaa bbb ddd
22+
selections:
23+
- anchor: {line: 0, character: 8}
24+
active: {line: 0, character: 8}
25+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: ordinalScope, scopeType: {type: token}, start: -1, length: 1}]}]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clear last token
4+
version: 3
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: ordinalScope
9+
scopeType: {type: token}
10+
start: -1
11+
length: 1
12+
usePrePhraseSnapshot: true
13+
action: {name: clearAndSetSelection}
14+
initialState:
15+
documentContents: aaa bbb ccc ddd
16+
selections:
17+
- anchor: {line: 0, character: 3}
18+
active: {line: 0, character: 8}
19+
marks: {}
20+
finalState:
21+
documentContents: aaa ccc ddd
22+
selections:
23+
- anchor: {line: 0, character: 4}
24+
active: {line: 0, character: 4}
25+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: ordinalScope, scopeType: {type: token}, start: -1, length: 1}]}]

0 commit comments

Comments
 (0)