Skip to content

Commit

Permalink
Add bunch of clone tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey committed Jun 6, 2022
1 parent a0bd2c5 commit dcd3eb3
Show file tree
Hide file tree
Showing 14 changed files with 468 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/test/suite/fixtures/recorded/actions/cloneArgue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
languageId: typescript
command:
spokenForm: clone argue
version: 2
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
usePrePhraseSnapshot: true
action: {name: insertCopyAfter}
initialState:
documentContents: |-
function foo(bar: number) {
}
selections:
- anchor: {line: 0, character: 15}
active: {line: 0, character: 15}
- anchor: {line: 0, character: 20}
active: {line: 0, character: 20}
marks: {}
finalState:
documentContents: |-
function foo(bar: number, bar: number) {
}
selections:
- anchor: {line: 0, character: 28}
active: {line: 0, character: 28}
- anchor: {line: 0, character: 33}
active: {line: 0, character: 33}
thatMark:
- anchor: {line: 0, character: 26}
active: {line: 0, character: 37}
sourceMark:
- anchor: {line: 0, character: 13}
active: {line: 0, character: 24}
decorations:
- name: justAddedBackground
type: token
start: {line: 0, character: 26}
end: {line: 0, character: 37}
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: argumentOrParameter}}]}]
35 changes: 35 additions & 0 deletions src/test/suite/fixtures/recorded/actions/cloneArgue2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
languageId: typescript
command:
spokenForm: clone argue
version: 2
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
usePrePhraseSnapshot: true
action: {name: insertCopyAfter}
initialState:
documentContents: |-
function foo(bar: number) {
}
selections:
- anchor: {line: 0, character: 24}
active: {line: 0, character: 24}
marks: {}
finalState:
documentContents: |-
function foo(bar: number, bar: number) {
}
selections:
- anchor: {line: 0, character: 37}
active: {line: 0, character: 37}
thatMark:
- anchor: {line: 0, character: 26}
active: {line: 0, character: 37}
sourceMark:
- anchor: {line: 0, character: 13}
active: {line: 0, character: 24}
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: argumentOrParameter}}]}]
34 changes: 34 additions & 0 deletions src/test/suite/fixtures/recorded/actions/cloneToken.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
languageId: plaintext
command:
spokenForm: clone token
version: 2
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: token}
usePrePhraseSnapshot: true
action: {name: insertCopyAfter}
initialState:
documentContents: hello world
selections:
- anchor: {line: 0, character: 8}
active: {line: 0, character: 8}
marks: {}
finalState:
documentContents: hello world world
selections:
- anchor: {line: 0, character: 14}
active: {line: 0, character: 14}
thatMark:
- anchor: {line: 0, character: 12}
active: {line: 0, character: 17}
sourceMark:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 11}
decorations:
- name: justAddedBackground
type: token
start: {line: 0, character: 12}
end: {line: 0, character: 17}
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
34 changes: 34 additions & 0 deletions src/test/suite/fixtures/recorded/actions/cloneToken2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
languageId: plaintext
command:
spokenForm: clone token
version: 2
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: token}
usePrePhraseSnapshot: true
action: {name: insertCopyAfter}
initialState:
documentContents: hello
selections:
- anchor: {line: 0, character: 3}
active: {line: 0, character: 3}
marks: {}
finalState:
documentContents: hello hello
selections:
- anchor: {line: 0, character: 9}
active: {line: 0, character: 9}
thatMark:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 11}
sourceMark:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 5}
decorations:
- name: justAddedBackground
type: token
start: {line: 0, character: 6}
end: {line: 0, character: 11}
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
29 changes: 29 additions & 0 deletions src/test/suite/fixtures/recorded/actions/cloneToken3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: plaintext
command:
spokenForm: clone token
version: 2
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: token}
usePrePhraseSnapshot: true
action: {name: insertCopyAfter}
initialState:
documentContents: hello
selections:
- anchor: {line: 0, character: 5}
active: {line: 0, character: 5}
marks: {}
finalState:
documentContents: hello hello
selections:
- anchor: {line: 0, character: 11}
active: {line: 0, character: 11}
thatMark:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 11}
sourceMark:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 5}
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
29 changes: 29 additions & 0 deletions src/test/suite/fixtures/recorded/actions/cloneToken4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: plaintext
command:
spokenForm: clone token
version: 2
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: token}
usePrePhraseSnapshot: true
action: {name: insertCopyAfter}
initialState:
documentContents: hello
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
marks: {}
finalState:
documentContents: hello hello
selections:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
thatMark:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 11}
sourceMark:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 5}
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
29 changes: 29 additions & 0 deletions src/test/suite/fixtures/recorded/actions/cloneToken5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: plaintext
command:
spokenForm: clone token
version: 2
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: token}
usePrePhraseSnapshot: true
action: {name: insertCopyAfter}
initialState:
documentContents: hello
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 5}
marks: {}
finalState:
documentContents: hello hello
selections:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 11}
thatMark:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 11}
sourceMark:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 5}
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
44 changes: 44 additions & 0 deletions src/test/suite/fixtures/recorded/actions/cloneUpArgue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
languageId: typescript
command:
spokenForm: clone up argue
version: 2
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
usePrePhraseSnapshot: true
action: {name: insertCopyBefore}
initialState:
documentContents: |-
function foo(bar: number) {
}
selections:
- anchor: {line: 0, character: 15}
active: {line: 0, character: 15}
- anchor: {line: 0, character: 20}
active: {line: 0, character: 20}
marks: {}
finalState:
documentContents: |-
function foo(bar: number, bar: number) {
}
selections:
- anchor: {line: 0, character: 15}
active: {line: 0, character: 15}
- anchor: {line: 0, character: 20}
active: {line: 0, character: 20}
thatMark:
- anchor: {line: 0, character: 13}
active: {line: 0, character: 24}
sourceMark:
- anchor: {line: 0, character: 26}
active: {line: 0, character: 37}
decorations:
- name: justAddedBackground
type: token
start: {line: 0, character: 13}
end: {line: 0, character: 24}
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: argumentOrParameter}}]}]
35 changes: 35 additions & 0 deletions src/test/suite/fixtures/recorded/actions/cloneUpArgue2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
languageId: typescript
command:
spokenForm: clone up argue
version: 2
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
usePrePhraseSnapshot: true
action: {name: insertCopyBefore}
initialState:
documentContents: |-
function foo(bar: number) {
}
selections:
- anchor: {line: 0, character: 13}
active: {line: 0, character: 13}
marks: {}
finalState:
documentContents: |-
function foo(bar: number, bar: number) {
}
selections:
- anchor: {line: 0, character: 13}
active: {line: 0, character: 13}
thatMark:
- anchor: {line: 0, character: 13}
active: {line: 0, character: 24}
sourceMark:
- anchor: {line: 0, character: 26}
active: {line: 0, character: 37}
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: argumentOrParameter}}]}]
34 changes: 34 additions & 0 deletions src/test/suite/fixtures/recorded/actions/cloneUpToken.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
languageId: plaintext
command:
spokenForm: clone up token
version: 2
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: token}
usePrePhraseSnapshot: true
action: {name: insertCopyBefore}
initialState:
documentContents: hello world
selections:
- anchor: {line: 0, character: 8}
active: {line: 0, character: 8}
marks: {}
finalState:
documentContents: hello world world
selections:
- anchor: {line: 0, character: 8}
active: {line: 0, character: 8}
thatMark:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 11}
sourceMark:
- anchor: {line: 0, character: 12}
active: {line: 0, character: 17}
decorations:
- name: justAddedBackground
type: token
start: {line: 0, character: 6}
end: {line: 0, character: 11}
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
34 changes: 34 additions & 0 deletions src/test/suite/fixtures/recorded/actions/cloneUpToken2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
languageId: plaintext
command:
spokenForm: clone up token
version: 2
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: token}
usePrePhraseSnapshot: true
action: {name: insertCopyBefore}
initialState:
documentContents: hello
selections:
- anchor: {line: 0, character: 3}
active: {line: 0, character: 3}
marks: {}
finalState:
documentContents: hello hello
selections:
- anchor: {line: 0, character: 3}
active: {line: 0, character: 3}
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 5}
sourceMark:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 11}
decorations:
- name: justAddedBackground
type: token
start: {line: 0, character: 0}
end: {line: 0, character: 5}
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
Loading

0 comments on commit dcd3eb3

Please sign in to comment.