Skip to content

Commit e10843e

Browse files
committed
test: repro for haskell#2662: extend import list miss separator
1 parent ed7f649 commit e10843e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ghcide/test/exe/Main.hs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,20 @@ extendImportTests = testGroup "extend import actions"
15201520
, "import ModuleA as A (stuffB, (.*))"
15211521
, "main = print (stuffB .* stuffB)"
15221522
])
1523+
, testSession "extend single line import with infix constructor" $ template
1524+
[]
1525+
("ModuleB.hs", T.unlines
1526+
[ "module ModuleB where"
1527+
, "import Data.List.NonEmpty (fromList)"
1528+
, "main = case (fromList []) of _ :| _ -> pure ()"
1529+
])
1530+
(Range (Position 2 5) (Position 2 6))
1531+
["Add NonEmpty((:|)) to the import list of Data.List.NonEmpty"]
1532+
(T.unlines
1533+
[ "module ModuleB where"
1534+
, "import Data.List.NonEmpty (fromList, NonEmpty ((:|)))"
1535+
, "main = case (fromList []) of _ :| _ -> pure ()"
1536+
])
15231537
, testSession "extend single line import with type" $ template
15241538
[("ModuleA.hs", T.unlines
15251539
[ "module ModuleA where"

0 commit comments

Comments
 (0)