Skip to content

Commit 27ff3ff

Browse files
committed
correctly indent gleam in tests
1 parent a986414 commit 27ff3ff

4 files changed

+28
-28
lines changed

compiler-core/src/language_server/tests/action.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9142,11 +9142,11 @@ fn wrap_call_arg_in_anonymous_function() {
91429142
"import gleam/list
91439143
91449144
pub fn main() {
9145-
list.map([1, 2, 3], op)
9145+
list.map([1, 2, 3], op)
91469146
}
91479147
91489148
fn op(i: Int) -> Int {
9149-
todo
9149+
todo
91509150
}
91519151
",
91529152
find_position_of("op").to_selection()
@@ -9158,11 +9158,11 @@ fn wrap_assignment_in_anonymous_function() {
91589158
assert_code_action!(
91599159
WRAP_IN_ANONYMOUS_FUNCTION,
91609160
"pub fn main() {
9161-
let op = op_factory(1, 2, 3)
9161+
let op = op_factory(1, 2, 3)
91629162
}
91639163
91649164
fn op_factory(a: Int, b: Int, c: Int) -> fn(Int) -> Int {
9165-
todo
9165+
todo
91669166
}
91679167
",
91689168
find_position_of("op_factory").to_selection()
@@ -9176,11 +9176,11 @@ fn unwrap_trivial_anonymous_function() {
91769176
"import gleam/list
91779177
91789178
pub fn main() {
9179-
list.map([1, 2, 3], fn(int) { op(int) })
9179+
list.map([1, 2, 3], fn(int) { op(int) })
91809180
}
91819181
91829182
fn op(i: Int) -> Int {
9183-
todo
9183+
todo
91849184
}
91859185
",
91869186
find_position_of("fn(int)").to_selection()
@@ -9194,11 +9194,11 @@ fn unwrap_anonymous_function_unavailable_when_args_discarded() {
91949194
"import gleam/list
91959195
91969196
pub fn main() {
9197-
list.index_map([1, 2, 3], fn(_, int) { op(int) })
9197+
list.index_map([1, 2, 3], fn(_, int) { op(int) })
91989198
}
91999199
92009200
fn op(i: Int) -> Int {
9201-
todo
9201+
todo
92029202
}
92039203
",
92049204
find_position_of("fn(_, int)").to_selection()
@@ -9214,11 +9214,11 @@ fn unwrap_anonymous_function_unavailable_with_different_args() {
92149214
const another_int = 7
92159215
92169216
pub fn main() {
9217-
list.map([1, 2, 3], fn(int) { op(another_int) })
9217+
list.map([1, 2, 3], fn(int) { op(another_int) })
92189218
}
92199219
92209220
fn op(i: Int) -> Int {
9221-
todo
9221+
todo
92229222
}
92239223
",
92249224
find_position_of("fn(int)").to_selection()
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
---
22
source: compiler-core/src/language_server/tests/action.rs
3-
expression: "import gleam/list\n\npub fn main() {\n list.map([1, 2, 3], fn(int) { op(int) })\n}\n\nfn op(i: Int) -> Int {\n todo\n}\n"
3+
expression: "import gleam/list\n\npub fn main() {\n list.map([1, 2, 3], fn(int) { op(int) })\n}\n\nfn op(i: Int) -> Int {\n todo\n}\n"
44
---
55
----- BEFORE ACTION
66
import gleam/list
77

88
pub fn main() {
9-
list.map([1, 2, 3], fn(int) { op(int) })
10-
9+
list.map([1, 2, 3], fn(int) { op(int) })
10+
1111
}
1212

1313
fn op(i: Int) -> Int {
14-
todo
14+
todo
1515
}
1616

1717

1818
----- AFTER ACTION
1919
import gleam/list
2020

2121
pub fn main() {
22-
list.map([1, 2, 3], op)
22+
list.map([1, 2, 3], op)
2323
}
2424

2525
fn op(i: Int) -> Int {
26-
todo
26+
todo
2727
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
22
source: compiler-core/src/language_server/tests/action.rs
3-
expression: "pub fn main() {\n let op = op_factory(1, 2, 3)\n}\n\nfn op_factory(a: Int, b: Int, c: Int) -> fn(Int) -> Int {\n todo\n}\n"
3+
expression: "pub fn main() {\n let op = op_factory(1, 2, 3)\n}\n\nfn op_factory(a: Int, b: Int, c: Int) -> fn(Int) -> Int {\n todo\n}\n"
44
---
55
----- BEFORE ACTION
66
pub fn main() {
7-
let op = op_factory(1, 2, 3)
8-
7+
let op = op_factory(1, 2, 3)
8+
99
}
1010

1111
fn op_factory(a: Int, b: Int, c: Int) -> fn(Int) -> Int {
12-
todo
12+
todo
1313
}
1414

1515

1616
----- AFTER ACTION
1717
pub fn main() {
18-
let op = fn(int) { op_factory(1, 2, 3)(int) }
18+
let op = fn(int) { op_factory(1, 2, 3)(int) }
1919
}
2020

2121
fn op_factory(a: Int, b: Int, c: Int) -> fn(Int) -> Int {
22-
todo
22+
todo
2323
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
---
22
source: compiler-core/src/language_server/tests/action.rs
3-
expression: "import gleam/list\n\npub fn main() {\n list.map([1, 2, 3], op)\n}\n\nfn op(i: Int) -> Int {\n todo\n}\n"
3+
expression: "import gleam/list\n\npub fn main() {\n list.map([1, 2, 3], op)\n}\n\nfn op(i: Int) -> Int {\n todo\n}\n"
44
---
55
----- BEFORE ACTION
66
import gleam/list
77

88
pub fn main() {
9-
list.map([1, 2, 3], op)
10-
9+
list.map([1, 2, 3], op)
10+
1111
}
1212

1313
fn op(i: Int) -> Int {
14-
todo
14+
todo
1515
}
1616

1717

1818
----- AFTER ACTION
1919
import gleam/list
2020

2121
pub fn main() {
22-
list.map([1, 2, 3], fn(int) { op(int) })
22+
list.map([1, 2, 3], fn(int) { op(int) })
2323
}
2424

2525
fn op(i: Int) -> Int {
26-
todo
26+
todo
2727
}

0 commit comments

Comments
 (0)