Skip to content

Commit e03a4f6

Browse files
committed
wip: add more scope tests
1 parent 69cd67b commit e03a4f6

23 files changed

+440
-24
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
foo(aaa, bbb);
2+
---
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
foo(
2+
aaa,
3+
bbb
4+
);
5+
---

data/fixtures/scopes/zig/argument.actual.singleLine.scope

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
foo(aa);
1+
foo(aaa, bbb);
22
---
33

44
[Content] =
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
fn foo(aaa: u8, bbb: u8) void {}
2+
---
3+
4+
[Content] = 0:7-0:23
5+
>----------------<
6+
0| fn foo(aaa: u8, bbb: u8) void {}
7+
8+
[Domain] = 0:0-0:32
9+
>--------------------------------<
10+
0| fn foo(aaa: u8, bbb: u8) void {}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
fn foo(
2+
aa: u8,
3+
bb: u8,
4+
) void {}
5+
---
6+
7+
[#1 Content] =
8+
[#1 Domain] = 1:4-1:10
9+
>------<
10+
1| aa: u8,
11+
12+
[#1 Removal] = 1:4-2:4
13+
>-------
14+
1| aa: u8,
15+
2| bb: u8,
16+
----<
17+
18+
[#1 Trailing delimiter] = 1:10-2:4
19+
>-
20+
1| aa: u8,
21+
2| bb: u8,
22+
----<
23+
24+
[#1 Insertion delimiter] = ",\n"
25+
26+
27+
[#2 Content] =
28+
[#2 Domain] = 2:4-2:10
29+
>------<
30+
2| bb: u8,
31+
32+
[#2 Removal] = 1:10-2:10
33+
>-
34+
1| aa: u8,
35+
2| bb: u8,
36+
----------<
37+
38+
[#2 Leading delimiter] = 1:10-2:4
39+
>-
40+
1| aa: u8,
41+
2| bb: u8,
42+
----<
43+
44+
[#2 Insertion delimiter] = ",\n"

data/fixtures/scopes/zig/argument.formal.singleLine.scope

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ fn foo(arg: u8) void {}
77
>-------<
88
0| fn foo(arg: u8) void {}
99

10-
[Insertion delimiter] = " "
10+
[Insertion delimiter] = ", "
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
foo();
2+
---
3+
4+
[Content] =
5+
[Removal] = 0:4-0:4
6+
><
7+
0| foo();
8+
9+
[Domain] = 0:0-0:5
10+
>-----<
11+
0| foo();
12+
13+
[Insertion delimiter] = " "
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
foo(aaa, bbb);
2+
---

data/fixtures/scopes/zig/argumentList.actual.singleLine.scope

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ foo(aaa, bbb);
22
---
33

44
[Content] =
5-
[Removal] =
6-
[Domain] = 0:4-0:12
5+
[Removal] = 0:4-0:12
76
>--------<
87
0| foo(aaa, bbb);
98

9+
[Domain] = 0:0-0:13
10+
>-------------<
11+
0| foo(aaa, bbb);
12+
1013
[Insertion delimiter] = " "
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
fn foo() void {}
2+
---
3+
4+
[Content] =
5+
[Removal] = 0:7-0:7
6+
><
7+
0| fn foo() void {}
8+
9+
[Domain] = 0:0-0:16
10+
>----------------<
11+
0| fn foo() void {}
12+
13+
[Insertion delimiter] = " "

0 commit comments

Comments
 (0)