Skip to content

Commit 0805c3e

Browse files
author
Ishmum Jawad Khan
committed
[test] testdata changed (passing)
1 parent a98d0bc commit 0805c3e

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

test/functional/FunctionalCodeAction.hs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ missingPragmaTests = testGroup "missing pragma warning code actions" [
559559
_ <- waitForDiagnosticsFrom doc
560560
cas <- map fromAction <$> getAllCodeActions doc
561561

562-
liftIO $ "Add \"TypeApplications\"" `elem` map (^. L.title) cas @? "Contains TypeApplications code action"
562+
liftIO $ "Add \"NamedFieldPuns\"" `elem` map (^. L.title) cas @? "Contains NamedFieldPuns code action"
563563

564564
executeCodeAction $ head cas
565565

@@ -569,12 +569,16 @@ missingPragmaTests = testGroup "missing pragma warning code actions" [
569569
[ "#! /usr/bin/env nix-shell"
570570
, "#! nix-shell --pure -i runghc -p \"haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])\""
571571
, ""
572-
, "{-# LANGUAGE ScopedTypeVariables #-}"
573-
, "{-# LANGUAGE TypeApplications #-}"
572+
, "{-# LANGUAGE NamedFieldPuns #-}"
574573
, "module AfterShebang where"
575574
, ""
576-
, "foo :: forall a. a -> a"
577-
, "foo = id @a"
575+
, "data Record = Record"
576+
, " { a :: Int,"
577+
, " b :: Double,"
578+
, " c :: String"
579+
, " }"
580+
, ""
581+
, "f Record{a, b} = a"
578582
]
579583

580584
liftIO $ T.lines contents @?= expected
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
#! /usr/bin/env nix-shell
22
#! nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (hp: with hp; [ turtle ])"
33

4-
{-# LANGUAGE ScopedTypeVariables #-}
54
module AfterShebang where
65

7-
foo :: forall a. a -> a
8-
foo = id @a
6+
data Record = Record
7+
{ a :: Int,
8+
b :: Double,
9+
c :: String
10+
}
11+
12+
f Record{a, b} = a

0 commit comments

Comments
 (0)