Skip to content

Commit 46a6780

Browse files
author
fidgetingbits
committed
update tests to use change and remove unneeded chucks
1 parent b82b3b6 commit 46a6780

37 files changed

+288
-712
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
languageId: nix
22
command:
33
version: 6
4-
spokenForm: take arg red look
4+
spokenForm: change arg bat
55
action:
6-
name: setSelection
6+
name: clearAndSetSelection
77
target:
88
type: primitive
9-
mark: {type: decoratedSymbol, symbolColor: red, character: l}
9+
mark: {type: decoratedSymbol, symbolColor: default, character: b}
1010
modifiers:
1111
- type: containingScope
1212
scopeType: {type: argumentOrParameter}
@@ -20,20 +20,20 @@ initialState:
2020
version = "1.0";
2121
}
2222
selections:
23-
- anchor: {line: 3, character: 7}
24-
active: {line: 3, character: 7}
23+
- anchor: {line: 0, character: 28}
24+
active: {line: 0, character: 28}
2525
marks:
26-
red.l:
27-
start: {line: 0, character: 2}
28-
end: {line: 0, character: 5}
26+
default.b:
27+
start: {line: 0, character: 7}
28+
end: {line: 0, character: 20}
2929
finalState:
3030
documentContents: |-
31-
{ lib, buildPackages, fetchurl, stdenv }:
31+
{ lib, , fetchurl, stdenv }:
3232
3333
stdenv.mkDerivation rec {
3434
name = "example-nix-package";
3535
version = "1.0";
3636
}
3737
selections:
38-
- anchor: {line: 0, character: 2}
39-
active: {line: 0, character: 5}
38+
- anchor: {line: 0, character: 7}
39+
active: {line: 0, character: 7}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
languageId: nix
22
command:
33
version: 6
4-
spokenForm: take call
4+
spokenForm: change call
55
action:
6-
name: setSelection
6+
name: clearAndSetSelection
77
target:
88
type: primitive
99
modifiers:
@@ -16,14 +16,14 @@ initialState:
1616
x = map (x: y: x + x) [ 1 2 3 ];
1717
}
1818
selections:
19-
- anchor: {line: 1, character: 29}
20-
active: {line: 1, character: 29}
19+
- anchor: {line: 1, character: 28}
20+
active: {line: 1, character: 28}
2121
marks: {}
2222
finalState:
2323
documentContents: |
2424
{
25-
x = map (x: y: x + x) [ 1 2 3 ];
25+
x = ;
2626
}
2727
selections:
2828
- anchor: {line: 1, character: 6}
29-
active: {line: 1, character: 33}
29+
active: {line: 1, character: 6}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
languageId: nix
22
command:
33
version: 6
4-
spokenForm: take callee
4+
spokenForm: change callee
55
action:
6-
name: setSelection
6+
name: clearAndSetSelection
77
target:
88
type: primitive
99
modifiers:
@@ -16,14 +16,14 @@ initialState:
1616
x = map (x: y: x + x) [ 1 2 3 ];
1717
}
1818
selections:
19-
- anchor: {line: 1, character: 15}
20-
active: {line: 1, character: 15}
19+
- anchor: {line: 1, character: 14}
20+
active: {line: 1, character: 14}
2121
marks: {}
2222
finalState:
2323
documentContents: |
2424
{
25-
x = map (x: y: x + x) [ 1 2 3 ];
25+
x = (x: y: x + x) [ 1 2 3 ];
2626
}
2727
selections:
2828
- anchor: {line: 1, character: 6}
29-
active: {line: 1, character: 9}
29+
active: {line: 1, character: 6}
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
languageId: nix
22
command:
33
version: 6
4-
spokenForm: take comment
4+
spokenForm: change comment
55
action:
6-
name: setSelection
6+
name: clearAndSetSelection
77
target:
88
type: primitive
99
modifiers:
1010
- type: containingScope
1111
scopeType: {type: comment}
1212
usePrePhraseSnapshot: true
1313
initialState:
14-
documentContents: "# Single-line comment"
14+
documentContents: |
15+
# Single-line comment
1516
selections:
1617
- anchor: {line: 0, character: 21}
1718
active: {line: 0, character: 21}
1819
marks: {}
1920
finalState:
20-
documentContents: "# Single-line comment"
21+
documentContents: |+
22+
2123
selections:
2224
- anchor: {line: 0, character: 0}
23-
active: {line: 0, character: 21}
25+
active: {line: 0, character: 0}

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/nix/chuckComment2.yml renamed to packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/nix/changeComment2.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
languageId: nix
22
command:
33
version: 6
4-
spokenForm: chuck comment
4+
spokenForm: change comment
55
action:
6-
name: remove
6+
name: clearAndSetSelection
77
target:
88
type: primitive
99
modifiers:
@@ -16,8 +16,8 @@ initialState:
1616
Multi-line comment
1717
*/
1818
selections:
19-
- anchor: {line: 0, character: 0}
20-
active: {line: 2, character: 2}
19+
- anchor: {line: 2, character: 0}
20+
active: {line: 2, character: 0}
2121
marks: {}
2222
finalState:
2323
documentContents: |+
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
11
languageId: nix
22
command:
33
version: 6
4-
spokenForm: take comment
4+
spokenForm: change comment
55
action:
6-
name: setSelection
6+
name: clearAndSetSelection
77
target:
88
type: primitive
99
modifiers:
1010
- type: containingScope
1111
scopeType: {type: comment}
1212
usePrePhraseSnapshot: true
1313
initialState:
14-
documentContents: |-
14+
documentContents: |
1515
{
1616
a = b; # Inline comment (test)
1717
b = c; # Inline comment 2
1818
}
19-
2019
selections:
21-
- anchor: {line: 1, character: 10}
22-
active: {line: 1, character: 10}
20+
- anchor: {line: 2, character: 13}
21+
active: {line: 2, character: 13}
2322
marks: {}
2423
finalState:
25-
documentContents: |-
24+
documentContents: |
2625
{
2726
a = b; # Inline comment (test)
28-
b = c; # Inline comment 2
27+
b = c;
2928
}
30-
3129
selections:
32-
- anchor: {line: 1, character: 9}
33-
active: {line: 1, character: 32}
30+
- anchor: {line: 2, character: 9}
31+
active: {line: 2, character: 9}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
languageId: nix
22
command:
33
version: 6
4-
spokenForm: take every arg
4+
spokenForm: change every arg
55
action:
6-
name: setSelection
6+
name: clearAndSetSelection
77
target:
88
type: primitive
99
modifiers:
@@ -19,23 +19,23 @@ initialState:
1919
version = "1.0";
2020
}
2121
selections:
22-
- anchor: {line: 0, character: 2}
23-
active: {line: 0, character: 5}
22+
- anchor: {line: 0, character: 18}
23+
active: {line: 0, character: 18}
2424
marks: {}
2525
finalState:
2626
documentContents: |-
27-
{ lib, buildPackages, fetchurl, stdenv }:
27+
{ , , , }:
2828
2929
stdenv.mkDerivation rec {
3030
name = "example-nix-package";
3131
version = "1.0";
3232
}
3333
selections:
3434
- anchor: {line: 0, character: 2}
35-
active: {line: 0, character: 5}
36-
- anchor: {line: 0, character: 7}
37-
active: {line: 0, character: 20}
38-
- anchor: {line: 0, character: 22}
39-
active: {line: 0, character: 30}
40-
- anchor: {line: 0, character: 32}
41-
active: {line: 0, character: 38}
35+
active: {line: 0, character: 2}
36+
- anchor: {line: 0, character: 4}
37+
active: {line: 0, character: 4}
38+
- anchor: {line: 0, character: 6}
39+
active: {line: 0, character: 6}
40+
- anchor: {line: 0, character: 8}
41+
active: {line: 0, character: 8}
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: change every if state
5+
action:
6+
name: clearAndSetSelection
7+
target:
8+
type: primitive
9+
modifiers:
10+
- type: everyScope
11+
scopeType: {type: ifStatement}
12+
usePrePhraseSnapshot: true
13+
initialState:
14+
documentContents: |
15+
{
16+
key = if a then b else c;
17+
key =
18+
if a
19+
then b
20+
else c;
21+
}
22+
selections:
23+
- anchor: {line: 5, character: 11}
24+
active: {line: 5, character: 11}
25+
marks: {}
26+
finalState:
27+
documentContents: |
28+
{
29+
key = ;
30+
key =
31+
;
32+
}
33+
selections:
34+
- anchor: {line: 1, character: 8}
35+
active: {line: 1, character: 8}
36+
- anchor: {line: 3, character: 4}
37+
active: {line: 3, character: 4}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
languageId: nix
22
command:
33
version: 6
4-
spokenForm: take every map
4+
spokenForm: change every map
55
action:
6-
name: setSelection
6+
name: clearAndSetSelection
77
target:
88
type: primitive
99
modifiers:
@@ -25,31 +25,32 @@ initialState:
2525
2626
c = { d = [ "1" 2 ] };
2727
};
28+
29+
a = rec {
30+
a = b;
31+
b = a + 1;
32+
};
2833
}
2934
selections:
30-
- anchor: {line: 6, character: 0}
31-
active: {line: 6, character: 0}
35+
- anchor: {line: 13, character: 0}
36+
active: {line: 13, character: 0}
3237
marks: {}
3338
finalState:
3439
documentContents: |
3540
{
36-
a = { a = b; c = d; };
37-
a = {
38-
a = b;
39-
c = d;
40-
};
41+
a = ;
42+
a = ;
4143
42-
a = {
43-
a = {
44-
b = 1; };
44+
a = ;
4545
46-
c = { d = [ "1" 2 ] };
47-
};
46+
a = ;
4847
}
4948
selections:
5049
- anchor: {line: 1, character: 8}
51-
active: {line: 1, character: 25}
50+
active: {line: 1, character: 8}
5251
- anchor: {line: 2, character: 8}
53-
active: {line: 5, character: 5}
54-
- anchor: {line: 7, character: 8}
55-
active: {line: 12, character: 5}
52+
active: {line: 2, character: 8}
53+
- anchor: {line: 4, character: 8}
54+
active: {line: 4, character: 8}
55+
- anchor: {line: 6, character: 8}
56+
active: {line: 6, character: 8}

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/nix/takeEveryMap2.yml renamed to packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/nix/changeEveryMap2.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
languageId: nix
22
command:
33
version: 6
4-
spokenForm: take every map
4+
spokenForm: change every map
55
action:
6-
name: setSelection
6+
name: clearAndSetSelection
77
target:
88
type: primitive
99
modifiers:
@@ -25,6 +25,11 @@ initialState:
2525
2626
c = { d = [ "1" 2 ] };
2727
};
28+
29+
a = rec {
30+
a = b;
31+
b = a + 1;
32+
};
2833
}
2934
selections:
3035
- anchor: {line: 10, character: 0}
@@ -40,14 +45,18 @@ finalState:
4045
};
4146
4247
a = {
43-
a = {
44-
b = 1; };
48+
a = ;
4549
46-
c = { d = [ "1" 2 ] };
50+
c = ;
51+
};
52+
53+
a = rec {
54+
a = b;
55+
b = a + 1;
4756
};
4857
}
4958
selections:
5059
- anchor: {line: 8, character: 12}
51-
active: {line: 9, character: 20}
52-
- anchor: {line: 11, character: 12}
53-
active: {line: 11, character: 29}
60+
active: {line: 8, character: 12}
61+
- anchor: {line: 10, character: 12}
62+
active: {line: 10, character: 12}

0 commit comments

Comments
 (0)