Skip to content

Commit e6ee64c

Browse files
committed
correctly indent gleam in tests
1 parent aed14a6 commit e6ee64c

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
@@ -9806,11 +9806,11 @@ fn wrap_call_arg_in_anonymous_function() {
98069806
"import gleam/list
98079807
98089808
pub fn main() {
9809-
list.map([1, 2, 3], op)
9809+
list.map([1, 2, 3], op)
98109810
}
98119811
98129812
fn op(i: Int) -> Int {
9813-
todo
9813+
todo
98149814
}
98159815
",
98169816
find_position_of("op").to_selection()
@@ -9822,11 +9822,11 @@ fn wrap_assignment_in_anonymous_function() {
98229822
assert_code_action!(
98239823
WRAP_IN_ANONYMOUS_FUNCTION,
98249824
"pub fn main() {
9825-
let op = op_factory(1, 2, 3)
9825+
let op = op_factory(1, 2, 3)
98269826
}
98279827
98289828
fn op_factory(a: Int, b: Int, c: Int) -> fn(Int) -> Int {
9829-
todo
9829+
todo
98309830
}
98319831
",
98329832
find_position_of("op_factory").to_selection()
@@ -9840,11 +9840,11 @@ fn unwrap_trivial_anonymous_function() {
98409840
"import gleam/list
98419841
98429842
pub fn main() {
9843-
list.map([1, 2, 3], fn(int) { op(int) })
9843+
list.map([1, 2, 3], fn(int) { op(int) })
98449844
}
98459845
98469846
fn op(i: Int) -> Int {
9847-
todo
9847+
todo
98489848
}
98499849
",
98509850
find_position_of("fn(int)").to_selection()
@@ -9858,11 +9858,11 @@ fn unwrap_anonymous_function_unavailable_when_args_discarded() {
98589858
"import gleam/list
98599859
98609860
pub fn main() {
9861-
list.index_map([1, 2, 3], fn(_, int) { op(int) })
9861+
list.index_map([1, 2, 3], fn(_, int) { op(int) })
98629862
}
98639863
98649864
fn op(i: Int) -> Int {
9865-
todo
9865+
todo
98669866
}
98679867
",
98689868
find_position_of("fn(_, int)").to_selection()
@@ -9878,11 +9878,11 @@ fn unwrap_anonymous_function_unavailable_with_different_args() {
98789878
const another_int = 7
98799879
98809880
pub fn main() {
9881-
list.map([1, 2, 3], fn(int) { op(another_int) })
9881+
list.map([1, 2, 3], fn(int) { op(another_int) })
98829882
}
98839883
98849884
fn op(i: Int) -> Int {
9885-
todo
9885+
todo
98869886
}
98879887
",
98889888
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)