@@ -29,11 +29,20 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
29
29
end
30
30
end
31
31
32
+ setup do
33
+ { :ok , _ } =
34
+ start_supervised ( % {
35
+ id: JsonRpcMock ,
36
+ start:
37
+ { JsonRpcMock , :start_link ,
38
+ [ [ success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) ] ] }
39
+ } )
40
+
41
+ :ok
42
+ end
43
+
32
44
describe "execute/2 toPipe" do
33
45
test "can pipe remote calls in single lines" do
34
- { :ok , _ } =
35
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
36
-
37
46
uri = "file:///some_file.ex"
38
47
39
48
text = """
@@ -105,9 +114,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
105
114
end
106
115
107
116
test "can pipe remote calls with multi-line args" do
108
- { :ok , _ } =
109
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
110
-
111
117
uri = "file:/some_file.ex"
112
118
113
119
text = """
@@ -182,9 +188,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
182
188
end
183
189
184
190
test "can pipe remote calls when there are multi-line args" do
185
- { :ok , _ } =
186
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
187
-
188
191
uri = "file:/some_file.ex"
189
192
190
193
text = """
@@ -486,9 +489,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
486
489
end
487
490
488
491
test "can pipe local calls in single line" do
489
- { :ok , _ } =
490
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
491
-
492
492
uri = "file:/some_file.ex"
493
493
494
494
text = """
@@ -562,9 +562,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
562
562
end
563
563
564
564
test "converts function_call_not_found to 3-tuple" do
565
- { :ok , _ } =
566
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
567
-
568
565
uri = "file:/some_file.ex"
569
566
570
567
text = """
@@ -595,9 +592,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
595
592
596
593
for { line_sep , test_name_suffix } <- [ { "\r \n " , "\\ r\\ n" } , { "\n " , "\\ n" } ] do
597
594
test "can pipe correctly when the line separator is #{ test_name_suffix } " do
598
- { :ok , _ } =
599
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
600
-
601
595
uri = "file:/some_file.ex"
602
596
603
597
base_code = [
@@ -672,9 +666,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
672
666
end
673
667
674
668
test "can handle utf 16 characters" do
675
- { :ok , _ } =
676
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
677
-
678
669
uri = "file:/some_file.ex"
679
670
680
671
text = """
@@ -773,9 +764,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
773
764
end
774
765
775
766
test "can handle multiple calls" do
776
- { :ok , _ } =
777
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
778
-
779
767
uri = "file:/some_file.ex"
780
768
781
769
text = """
@@ -849,9 +837,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
849
837
850
838
describe "execute/2 fromPipe" do
851
839
test "can unpipe remote calls in single lines" do
852
- { :ok , _ } =
853
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
854
-
855
840
uri = "file:/some_file.ex"
856
841
857
842
text = """
@@ -923,9 +908,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
923
908
end
924
909
925
910
test "can unpipe remote calls when there are multi-line args" do
926
- { :ok , _ } =
927
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
928
-
929
911
uri = "file:/some_file.ex"
930
912
931
913
text = """
@@ -1000,9 +982,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
1000
982
end
1001
983
1002
984
test "can unpipe local calls in single line" do
1003
- { :ok , _ } =
1004
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
1005
-
1006
985
uri = "file:/some_file.ex"
1007
986
1008
987
text = """
@@ -1077,9 +1056,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
1077
1056
1078
1057
for { line_sep , test_name_suffix } <- [ { "\r \n " , "\\ r\\ n" } , { "\n " , "\\ n" } ] do
1079
1058
test "can unpipe correctly when the line separator is #{ test_name_suffix } " do
1080
- { :ok , _ } =
1081
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
1082
-
1083
1059
uri = "file:/some_file.ex"
1084
1060
1085
1061
base_code = [
@@ -1152,9 +1128,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
1152
1128
end
1153
1129
1154
1130
test "can handle multiple calls in no-op execution" do
1155
- { :ok , _ } =
1156
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
1157
-
1158
1131
uri = "file:/some_file.ex"
1159
1132
1160
1133
text = """
@@ -1187,9 +1160,6 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ManipulatePipesTest d
1187
1160
end
1188
1161
1189
1162
test "can handle utf 16 characters" do
1190
- { :ok , _ } =
1191
- JsonRpcMock . start_link ( success_reply: { :ok , % { "applied" => true } } , test_pid: self ( ) )
1192
-
1193
1163
uri = "file:/some_file.ex"
1194
1164
1195
1165
text = """
0 commit comments