Skip to content

Commit 6066ce0

Browse files
committed
Add bunch of clone tests
1 parent a0bd2c5 commit 6066ce0

16 files changed

+468
-63
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
languageId: typescript
2+
command:
3+
spokenForm: clone argue
4+
version: 2
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: containingScope
9+
scopeType: {type: argumentOrParameter}
10+
usePrePhraseSnapshot: true
11+
action: {name: insertCopyAfter}
12+
initialState:
13+
documentContents: |-
14+
function foo(bar: number) {
15+
16+
}
17+
selections:
18+
- anchor: {line: 0, character: 15}
19+
active: {line: 0, character: 15}
20+
- anchor: {line: 0, character: 20}
21+
active: {line: 0, character: 20}
22+
marks: {}
23+
finalState:
24+
documentContents: |-
25+
function foo(bar: number, bar: number) {
26+
27+
}
28+
selections:
29+
- anchor: {line: 0, character: 28}
30+
active: {line: 0, character: 28}
31+
- anchor: {line: 0, character: 33}
32+
active: {line: 0, character: 33}
33+
thatMark:
34+
- anchor: {line: 0, character: 26}
35+
active: {line: 0, character: 37}
36+
sourceMark:
37+
- anchor: {line: 0, character: 13}
38+
active: {line: 0, character: 24}
39+
decorations:
40+
- name: justAddedBackground
41+
type: token
42+
start: {line: 0, character: 26}
43+
end: {line: 0, character: 37}
44+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: argumentOrParameter}}]}]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
languageId: typescript
2+
command:
3+
spokenForm: clone argue
4+
version: 2
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: containingScope
9+
scopeType: {type: argumentOrParameter}
10+
usePrePhraseSnapshot: true
11+
action: {name: insertCopyAfter}
12+
initialState:
13+
documentContents: |-
14+
function foo(bar: number) {
15+
16+
}
17+
selections:
18+
- anchor: {line: 0, character: 24}
19+
active: {line: 0, character: 24}
20+
marks: {}
21+
finalState:
22+
documentContents: |-
23+
function foo(bar: number, bar: number) {
24+
25+
}
26+
selections:
27+
- anchor: {line: 0, character: 37}
28+
active: {line: 0, character: 37}
29+
thatMark:
30+
- anchor: {line: 0, character: 26}
31+
active: {line: 0, character: 37}
32+
sourceMark:
33+
- anchor: {line: 0, character: 13}
34+
active: {line: 0, character: 24}
35+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: argumentOrParameter}}]}]
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clone token
4+
version: 2
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: containingScope
9+
scopeType: {type: token}
10+
usePrePhraseSnapshot: true
11+
action: {name: insertCopyAfter}
12+
initialState:
13+
documentContents: hello world
14+
selections:
15+
- anchor: {line: 0, character: 8}
16+
active: {line: 0, character: 8}
17+
marks: {}
18+
finalState:
19+
documentContents: hello world world
20+
selections:
21+
- anchor: {line: 0, character: 14}
22+
active: {line: 0, character: 14}
23+
thatMark:
24+
- anchor: {line: 0, character: 12}
25+
active: {line: 0, character: 17}
26+
sourceMark:
27+
- anchor: {line: 0, character: 6}
28+
active: {line: 0, character: 11}
29+
decorations:
30+
- name: justAddedBackground
31+
type: token
32+
start: {line: 0, character: 12}
33+
end: {line: 0, character: 17}
34+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clone token
4+
version: 2
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: containingScope
9+
scopeType: {type: token}
10+
usePrePhraseSnapshot: true
11+
action: {name: insertCopyAfter}
12+
initialState:
13+
documentContents: hello
14+
selections:
15+
- anchor: {line: 0, character: 3}
16+
active: {line: 0, character: 3}
17+
marks: {}
18+
finalState:
19+
documentContents: hello hello
20+
selections:
21+
- anchor: {line: 0, character: 9}
22+
active: {line: 0, character: 9}
23+
thatMark:
24+
- anchor: {line: 0, character: 6}
25+
active: {line: 0, character: 11}
26+
sourceMark:
27+
- anchor: {line: 0, character: 0}
28+
active: {line: 0, character: 5}
29+
decorations:
30+
- name: justAddedBackground
31+
type: token
32+
start: {line: 0, character: 6}
33+
end: {line: 0, character: 11}
34+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clone token
4+
version: 2
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: containingScope
9+
scopeType: {type: token}
10+
usePrePhraseSnapshot: true
11+
action: {name: insertCopyAfter}
12+
initialState:
13+
documentContents: hello
14+
selections:
15+
- anchor: {line: 0, character: 5}
16+
active: {line: 0, character: 5}
17+
marks: {}
18+
finalState:
19+
documentContents: hello hello
20+
selections:
21+
- anchor: {line: 0, character: 11}
22+
active: {line: 0, character: 11}
23+
thatMark:
24+
- anchor: {line: 0, character: 6}
25+
active: {line: 0, character: 11}
26+
sourceMark:
27+
- anchor: {line: 0, character: 0}
28+
active: {line: 0, character: 5}
29+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clone token
4+
version: 2
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: containingScope
9+
scopeType: {type: token}
10+
usePrePhraseSnapshot: true
11+
action: {name: insertCopyAfter}
12+
initialState:
13+
documentContents: hello
14+
selections:
15+
- anchor: {line: 0, character: 0}
16+
active: {line: 0, character: 0}
17+
marks: {}
18+
finalState:
19+
documentContents: hello hello
20+
selections:
21+
- anchor: {line: 0, character: 6}
22+
active: {line: 0, character: 6}
23+
thatMark:
24+
- anchor: {line: 0, character: 6}
25+
active: {line: 0, character: 11}
26+
sourceMark:
27+
- anchor: {line: 0, character: 0}
28+
active: {line: 0, character: 5}
29+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clone token
4+
version: 2
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: containingScope
9+
scopeType: {type: token}
10+
usePrePhraseSnapshot: true
11+
action: {name: insertCopyAfter}
12+
initialState:
13+
documentContents: hello
14+
selections:
15+
- anchor: {line: 0, character: 0}
16+
active: {line: 0, character: 5}
17+
marks: {}
18+
finalState:
19+
documentContents: hello hello
20+
selections:
21+
- anchor: {line: 0, character: 6}
22+
active: {line: 0, character: 11}
23+
thatMark:
24+
- anchor: {line: 0, character: 6}
25+
active: {line: 0, character: 11}
26+
sourceMark:
27+
- anchor: {line: 0, character: 0}
28+
active: {line: 0, character: 5}
29+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
languageId: typescript
2+
command:
3+
spokenForm: clone up argue
4+
version: 2
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: containingScope
9+
scopeType: {type: argumentOrParameter}
10+
usePrePhraseSnapshot: true
11+
action: {name: insertCopyBefore}
12+
initialState:
13+
documentContents: |-
14+
function foo(bar: number) {
15+
16+
}
17+
selections:
18+
- anchor: {line: 0, character: 15}
19+
active: {line: 0, character: 15}
20+
- anchor: {line: 0, character: 20}
21+
active: {line: 0, character: 20}
22+
marks: {}
23+
finalState:
24+
documentContents: |-
25+
function foo(bar: number, bar: number) {
26+
27+
}
28+
selections:
29+
- anchor: {line: 0, character: 15}
30+
active: {line: 0, character: 15}
31+
- anchor: {line: 0, character: 20}
32+
active: {line: 0, character: 20}
33+
thatMark:
34+
- anchor: {line: 0, character: 13}
35+
active: {line: 0, character: 24}
36+
sourceMark:
37+
- anchor: {line: 0, character: 26}
38+
active: {line: 0, character: 37}
39+
decorations:
40+
- name: justAddedBackground
41+
type: token
42+
start: {line: 0, character: 13}
43+
end: {line: 0, character: 24}
44+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: argumentOrParameter}}]}]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
languageId: typescript
2+
command:
3+
spokenForm: clone up argue
4+
version: 2
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: containingScope
9+
scopeType: {type: argumentOrParameter}
10+
usePrePhraseSnapshot: true
11+
action: {name: insertCopyBefore}
12+
initialState:
13+
documentContents: |-
14+
function foo(bar: number) {
15+
16+
}
17+
selections:
18+
- anchor: {line: 0, character: 13}
19+
active: {line: 0, character: 13}
20+
marks: {}
21+
finalState:
22+
documentContents: |-
23+
function foo(bar: number, bar: number) {
24+
25+
}
26+
selections:
27+
- anchor: {line: 0, character: 13}
28+
active: {line: 0, character: 13}
29+
thatMark:
30+
- anchor: {line: 0, character: 13}
31+
active: {line: 0, character: 24}
32+
sourceMark:
33+
- anchor: {line: 0, character: 26}
34+
active: {line: 0, character: 37}
35+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: argumentOrParameter}}]}]
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clone up token
4+
version: 2
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: containingScope
9+
scopeType: {type: token}
10+
usePrePhraseSnapshot: true
11+
action: {name: insertCopyBefore}
12+
initialState:
13+
documentContents: hello world
14+
selections:
15+
- anchor: {line: 0, character: 8}
16+
active: {line: 0, character: 8}
17+
marks: {}
18+
finalState:
19+
documentContents: hello world world
20+
selections:
21+
- anchor: {line: 0, character: 8}
22+
active: {line: 0, character: 8}
23+
thatMark:
24+
- anchor: {line: 0, character: 6}
25+
active: {line: 0, character: 11}
26+
sourceMark:
27+
- anchor: {line: 0, character: 12}
28+
active: {line: 0, character: 17}
29+
decorations:
30+
- name: justAddedBackground
31+
type: token
32+
start: {line: 0, character: 6}
33+
end: {line: 0, character: 11}
34+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
languageId: plaintext
2+
command:
3+
spokenForm: clone up token
4+
version: 2
5+
targets:
6+
- type: primitive
7+
modifiers:
8+
- type: containingScope
9+
scopeType: {type: token}
10+
usePrePhraseSnapshot: true
11+
action: {name: insertCopyBefore}
12+
initialState:
13+
documentContents: hello
14+
selections:
15+
- anchor: {line: 0, character: 3}
16+
active: {line: 0, character: 3}
17+
marks: {}
18+
finalState:
19+
documentContents: hello hello
20+
selections:
21+
- anchor: {line: 0, character: 3}
22+
active: {line: 0, character: 3}
23+
thatMark:
24+
- anchor: {line: 0, character: 0}
25+
active: {line: 0, character: 5}
26+
sourceMark:
27+
- anchor: {line: 0, character: 6}
28+
active: {line: 0, character: 11}
29+
decorations:
30+
- name: justAddedBackground
31+
type: token
32+
start: {line: 0, character: 0}
33+
end: {line: 0, character: 5}
34+
fullTargets: [{type: primitive, mark: {type: cursor}, modifiers: [{type: containingScope, scopeType: {type: token}}]}]

0 commit comments

Comments
 (0)