Skip to content

Commit 9f6fc95

Browse files
committed
Add casesplit CodeAction test
1 parent 0fb4728 commit 9f6fc95

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/functional/HaReSpec.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ spec = describe "HaRe" $
4949
expected = "\nmain = putStrLn \"hello\"\n\n\
5050
\foo x = y + 3\n where\n y = 7\n"
5151
in execCodeAction "HaReDemote.hs" r "Demote y one level" expected
52+
context "casesplit argument" $ it "works" $
53+
let r = Range (Position 4 5) (Position 4 6)
54+
expected = "\nmain = putStrLn \"hello\"\n\n\
55+
\foo :: Maybe Int -> ()\n\
56+
\foo Nothing = ()\n\
57+
\foo (Just x) = ()\n"
58+
in execCodeAction "GhcModCaseSplit.hs" r "Case split on x" expected
5259

5360

5461
getCANamed :: T.Text -> [CAResult] -> CodeAction

0 commit comments

Comments
 (0)