Skip to content

Commit b82b3b6

Browse files
author
fidgetingbits
committed
A bunch of tests for what works
1 parent e1d7394 commit b82b3b6

33 files changed

+1236
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
languageId: nix
2+
command:
3+
version: 6
4+
spokenForm: chuck call
5+
action:
6+
name: remove
7+
target:
8+
type: primitive
9+
modifiers:
10+
- type: containingScope
11+
scopeType: {type: functionCall}
12+
usePrePhraseSnapshot: true
13+
initialState:
14+
documentContents: |
15+
{
16+
x = map (x: y: x + x) [ 1 2 3 ];
17+
}
18+
selections:
19+
- anchor: {line: 1, character: 29}
20+
active: {line: 1, character: 29}
21+
marks: {}
22+
finalState:
23+
documentContents: |
24+
{
25+
x =;
26+
}
27+
selections:
28+
- anchor: {line: 1, character: 5}
29+
active: {line: 1, character: 5}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
languageId: nix
2+
command:
3+
version: 6
4+
spokenForm: chuck comment
5+
action:
6+
name: remove
7+
target:
8+
type: primitive
9+
modifiers:
10+
- type: containingScope
11+
scopeType: {type: comment}
12+
usePrePhraseSnapshot: true
13+
initialState:
14+
documentContents: "# Single-line comment"
15+
selections:
16+
- anchor: {line: 0, character: 0}
17+
active: {line: 0, character: 0}
18+
marks: {}
19+
finalState:
20+
documentContents: ""
21+
selections:
22+
- anchor: {line: 0, character: 0}
23+
active: {line: 0, character: 0}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
languageId: nix
2+
command:
3+
version: 6
4+
spokenForm: chuck comment
5+
action:
6+
name: remove
7+
target:
8+
type: primitive
9+
modifiers:
10+
- type: containingScope
11+
scopeType: {type: comment}
12+
usePrePhraseSnapshot: true
13+
initialState:
14+
documentContents: |
15+
/*
16+
Multi-line comment
17+
*/
18+
selections:
19+
- anchor: {line: 0, character: 0}
20+
active: {line: 2, character: 2}
21+
marks: {}
22+
finalState:
23+
documentContents: |+
24+
25+
selections:
26+
- anchor: {line: 0, character: 0}
27+
active: {line: 0, character: 0}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
languageId: nix
2+
command:
3+
version: 6
4+
spokenForm: chuck comment each
5+
action:
6+
name: remove
7+
target:
8+
type: primitive
9+
mark: {type: decoratedSymbol, symbolColor: default, character: e}
10+
modifiers:
11+
- type: containingScope
12+
scopeType: {type: comment}
13+
usePrePhraseSnapshot: true
14+
initialState:
15+
documentContents: |-
16+
{
17+
a = b; # Inline comment (test)
18+
b = c; # Inline comment 2
19+
}
20+
21+
selections:
22+
- anchor: {line: 1, character: 9}
23+
active: {line: 1, character: 32}
24+
marks:
25+
default.e:
26+
start: {line: 2, character: 18}
27+
end: {line: 2, character: 25}
28+
finalState:
29+
documentContents: |-
30+
{
31+
a = b; # Inline comment (test)
32+
b = c;
33+
}
34+
35+
selections:
36+
- anchor: {line: 1, character: 9}
37+
active: {line: 1, character: 32}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
languageId: nix
2+
command:
3+
version: 6
4+
spokenForm: chuck if state fine
5+
action:
6+
name: remove
7+
target:
8+
type: primitive
9+
mark: {type: decoratedSymbol, symbolColor: default, character: f}
10+
modifiers:
11+
- type: containingScope
12+
scopeType: {type: ifStatement}
13+
usePrePhraseSnapshot: true
14+
initialState:
15+
documentContents: |-
16+
{
17+
key = if a then b else c;
18+
key1 = if a then b else c;
19+
}
20+
21+
selections:
22+
- anchor: {line: 3, character: 0}
23+
active: {line: 3, character: 0}
24+
marks:
25+
default.f:
26+
start: {line: 2, character: 9}
27+
end: {line: 2, character: 11}
28+
finalState:
29+
documentContents: |-
30+
{
31+
key = if a then b else c;
32+
key1 =;
33+
}
34+
35+
selections:
36+
- anchor: {line: 3, character: 0}
37+
active: {line: 3, character: 0}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
languageId: nix
2+
command:
3+
version: 6
4+
spokenForm: chuck list
5+
action:
6+
name: remove
7+
target:
8+
type: primitive
9+
modifiers:
10+
- type: containingScope
11+
scopeType: {type: list}
12+
usePrePhraseSnapshot: true
13+
initialState:
14+
documentContents: |
15+
{
16+
foo = [ "a" a/b/c "b" ];
17+
bar = [ A
18+
B
19+
C # foo
20+
];
21+
}
22+
selections:
23+
- anchor: {line: 1, character: 14}
24+
active: {line: 1, character: 14}
25+
marks: {}
26+
finalState:
27+
documentContents: |
28+
{
29+
foo =;
30+
bar = [ A
31+
B
32+
C # foo
33+
];
34+
}
35+
selections:
36+
- anchor: {line: 1, character: 7}
37+
active: {line: 1, character: 7}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
languageId: nix
2+
command:
3+
version: 6
4+
spokenForm: chuck list air
5+
action:
6+
name: remove
7+
target:
8+
type: primitive
9+
mark: {type: decoratedSymbol, symbolColor: default, character: a}
10+
modifiers:
11+
- type: containingScope
12+
scopeType: {type: list}
13+
usePrePhraseSnapshot: true
14+
initialState:
15+
documentContents: |
16+
{
17+
foo = [ "a" a/b/c "b" ];
18+
bar = [ A
19+
B
20+
C # foo
21+
];
22+
}
23+
selections:
24+
- anchor: {line: 5, character: 0}
25+
active: {line: 5, character: 0}
26+
marks:
27+
default.a:
28+
start: {line: 2, character: 10}
29+
end: {line: 2, character: 11}
30+
finalState:
31+
documentContents: |
32+
{
33+
foo = [ "a" a/b/c "b" ];
34+
bar =;
35+
}
36+
selections:
37+
- anchor: {line: 2, character: 7}
38+
active: {line: 2, character: 7}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
languageId: nix
2+
command:
3+
version: 6
4+
spokenForm: chuck map blue air
5+
action:
6+
name: remove
7+
target:
8+
type: primitive
9+
mark: {type: decoratedSymbol, symbolColor: blue, character: a}
10+
modifiers:
11+
- type: containingScope
12+
scopeType: {type: map}
13+
usePrePhraseSnapshot: true
14+
initialState:
15+
documentContents: |
16+
{
17+
a = { a = b; c = d; };
18+
a = {
19+
a = b;
20+
c = d;
21+
};
22+
23+
}
24+
selections:
25+
- anchor: {line: 6, character: 0}
26+
active: {line: 6, character: 0}
27+
marks:
28+
blue.a:
29+
start: {line: 1, character: 10}
30+
end: {line: 1, character: 11}
31+
finalState:
32+
documentContents: |
33+
{
34+
a =;
35+
a = {
36+
a = b;
37+
c = d;
38+
};
39+
40+
}
41+
selections:
42+
- anchor: {line: 6, character: 0}
43+
active: {line: 6, character: 0}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
languageId: nix
2+
command:
3+
version: 6
4+
spokenForm: chuck map blue right brace
5+
action:
6+
name: remove
7+
target:
8+
type: primitive
9+
mark: {type: decoratedSymbol, symbolColor: blue, character: '}'}
10+
modifiers:
11+
- type: containingScope
12+
scopeType: {type: map}
13+
usePrePhraseSnapshot: true
14+
initialState:
15+
documentContents: |
16+
{
17+
a = { a = b; c = d; };
18+
a = {
19+
a = b;
20+
c = d;
21+
};
22+
23+
}
24+
selections:
25+
- anchor: {line: 6, character: 0}
26+
active: {line: 6, character: 0}
27+
marks:
28+
blue.}:
29+
start: {line: 7, character: 0}
30+
end: {line: 7, character: 1}
31+
finalState:
32+
documentContents: |+
33+
34+
selections:
35+
- anchor: {line: 0, character: 0}
36+
active: {line: 0, character: 0}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
languageId: nix
2+
command:
3+
version: 6
4+
spokenForm: chuck map equals
5+
action:
6+
name: remove
7+
target:
8+
type: primitive
9+
mark: {type: decoratedSymbol, symbolColor: default, character: '='}
10+
modifiers:
11+
- type: containingScope
12+
scopeType: {type: map}
13+
usePrePhraseSnapshot: true
14+
initialState:
15+
documentContents: |
16+
{
17+
a = { a = b; c = d; };
18+
a = {
19+
a = b;
20+
c = d;
21+
};
22+
23+
}
24+
selections:
25+
- anchor: {line: 6, character: 0}
26+
active: {line: 6, character: 0}
27+
marks:
28+
default.=:
29+
start: {line: 3, character: 10}
30+
end: {line: 3, character: 11}
31+
finalState:
32+
documentContents: |
33+
{
34+
a = { a = b; c = d; };
35+
a =;
36+
37+
}
38+
selections:
39+
- anchor: {line: 3, character: 0}
40+
active: {line: 3, character: 0}

0 commit comments

Comments
 (0)