File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -1170,6 +1170,25 @@ extendImportTests = testGroup "extend import actions"
1170
1170
, " import ModuleA (A (Constructor))"
1171
1171
, " b :: A"
1172
1172
, " b = Constructor"
1173
+ ])
1174
+ , testSession " extend single line import with constructor (with comments)" $ template
1175
+ [(" ModuleA.hs" , T. unlines
1176
+ [ " module ModuleA where"
1177
+ , " data A = Constructor"
1178
+ ])]
1179
+ (" ModuleB.hs" , T. unlines
1180
+ [ " module ModuleB where"
1181
+ , " import ModuleA (A ({-Constructor-}))"
1182
+ , " b :: A"
1183
+ , " b = Constructor"
1184
+ ])
1185
+ (Range (Position 2 5 ) (Position 2 5 ))
1186
+ [" Add A(Constructor) to the import list of ModuleA" ]
1187
+ (T. unlines
1188
+ [ " module ModuleB where"
1189
+ , " import ModuleA (A (Constructor{-Constructor-}))"
1190
+ , " b :: A"
1191
+ , " b = Constructor"
1173
1192
])
1174
1193
, testSession " extend single line import with mixed constructors" $ template
1175
1194
[(" ModuleA.hs" , T. unlines
You can’t perform that action at this time.
0 commit comments