Skip to content

Commit

Permalink
Add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey committed Mar 14, 2024
1 parent 87b1cf4 commit 3f4b66c
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
languageId: plaintext
command:
version: 6
spokenForm: change every first three tokens
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: ordinalScope
scopeType: {type: token}
start: 0
length: 3
isEvery: true
usePrePhraseSnapshot: true
initialState:
documentContents: aaa bbb ccc ddd
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
marks: {}
finalState:
documentContents: " ddd"
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
- anchor: {line: 0, character: 1}
active: {line: 0, character: 1}
- anchor: {line: 0, character: 2}
active: {line: 0, character: 2}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
languageId: plaintext
command:
version: 6
spokenForm: change every last three tokens
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: ordinalScope
scopeType: {type: token}
start: -3
length: 3
isEvery: true
usePrePhraseSnapshot: true
initialState:
documentContents: aaa bbb ccc ddd
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
marks: {}
finalState:
documentContents: "aaa "
selections:
- anchor: {line: 0, character: 4}
active: {line: 0, character: 4}
- anchor: {line: 0, character: 5}
active: {line: 0, character: 5}
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
languageId: plaintext
command:
version: 6
spokenForm: change every next three tokens
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: relativeScope
scopeType: {type: token}
offset: 1
length: 3
direction: forward
isEvery: true
usePrePhraseSnapshot: true
initialState:
documentContents: aaa bbb ccc ddd
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
marks: {}
finalState:
documentContents: "aaa "
selections:
- anchor: {line: 0, character: 4}
active: {line: 0, character: 4}
- anchor: {line: 0, character: 5}
active: {line: 0, character: 5}
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
languageId: plaintext
command:
version: 6
spokenForm: change every previous three tokens
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: relativeScope
scopeType: {type: token}
offset: 1
length: 3
direction: backward
isEvery: true
usePrePhraseSnapshot: true
initialState:
documentContents: aaa bbb ccc ddd
selections:
- anchor: {line: 0, character: 15}
active: {line: 0, character: 15}
marks: {}
finalState:
documentContents: " ddd"
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
- anchor: {line: 0, character: 1}
active: {line: 0, character: 1}
- anchor: {line: 0, character: 2}
active: {line: 0, character: 2}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
languageId: plaintext
command:
version: 6
spokenForm: change every three tokens
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: relativeScope
scopeType: {type: token}
offset: 0
length: 3
direction: forward
isEvery: true
usePrePhraseSnapshot: true
initialState:
documentContents: aaa bbb ccc ddd
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
marks: {}
finalState:
documentContents: " ddd"
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
- anchor: {line: 0, character: 1}
active: {line: 0, character: 1}
- anchor: {line: 0, character: 2}
active: {line: 0, character: 2}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
languageId: plaintext
command:
version: 6
spokenForm: change every three tokens backward
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: relativeScope
scopeType: {type: token}
offset: 0
length: 3
direction: backward
isEvery: true
usePrePhraseSnapshot: true
initialState:
documentContents: aaa bbb ccc ddd
selections:
- anchor: {line: 0, character: 15}
active: {line: 0, character: 15}
marks: {}
finalState:
documentContents: "aaa "
selections:
- anchor: {line: 0, character: 4}
active: {line: 0, character: 4}
- anchor: {line: 0, character: 5}
active: {line: 0, character: 5}
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}

0 comments on commit 3f4b66c

Please sign in to comment.