Skip to content

Commit 26cb575

Browse files
authored
Add completion tests for records. (#804)
1 parent b387bb2 commit 26cb575

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/exe/Main.hs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2547,7 +2547,18 @@ localCompletionTests = [
25472547
"class"
25482548
["bar :: Xx", "xxx = ()", "-- | haddock", "class Xxx a"]
25492549
(Position 0 9)
2550-
[("Xxx", CiClass, False, True)]
2550+
[("Xxx", CiClass, False, True)],
2551+
completionTest
2552+
"records"
2553+
["data Person = Person { _personName:: String, _personAge:: Int}", "bar = Person { _pers }" ]
2554+
(Position 1 19)
2555+
[("_personName", CiFunction, False, True),
2556+
("_personAge", CiFunction, False, True)],
2557+
completionTest
2558+
"recordsConstructor"
2559+
["data XxRecord = XyRecord { x:: String, y:: Int}", "bar = Xy" ]
2560+
(Position 1 19)
2561+
[("XyRecord", CiConstructor, False, True)]
25512562
]
25522563

25532564
nonLocalCompletionTests :: [TestTree]

0 commit comments

Comments
 (0)