You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* new parser for stuff before first declaration
* remove unused pragmas, modify haddock comment on parser
* working but need to clean lots of little things and add more tests
* uncomment completions functions and tests (was trying to see why the test timeout), merge textedits to get around lsp-test applying text edits in reverse order, inserting pragma between lines fixes, some tests
* add line splitting tests, fix line splitting errors and among other things, add docs
* change comments, add cpp for setting use_pos_prags bit in PState
* add safeImportsOn to compat, fix ghc versions
* fix compat
* fix compat
* fix compat 3
* fix compat 4
* fix compat 5
* fix test
* fix compat 6
* add back some tests and investigate haskell#2375 later
Co-authored-by: Javier Neira <[email protected]>
Copy file name to clipboardExpand all lines: plugins/hls-pragmas-plugin/test/Main.hs
+20-4
Original file line number
Diff line number
Diff line change
@@ -27,9 +27,24 @@ tests =
27
27
codeActionTests::TestTree
28
28
codeActionTests =
29
29
testGroup "code actions"
30
-
[ codeActionTest "adds LANGUAGE with no other pragmas at start ignoring later INLINE pragma""AddPragmaIgnoreInline" [("Add \"TupleSections\"", "Contains TupleSections code action")]
31
-
, codeActionTest "adds LANGUAGE after shebang preceded by other LANGUAGE and GHC_OPTIONS""AddPragmaAfterShebangPrecededByLangAndOptsGhc" [("Add \"TupleSections\"", "Contains TupleSections code action")]
32
-
, codeActionTest "adds LANGUAGE after shebang with other Language preceding shebang""AddPragmaAfterShebangPrecededByLangAndOptsGhc" [("Add \"TupleSections\"", "Contains TupleSections code action")]
30
+
[
31
+
codeActionTest "Block comment then line comment doesn't split line""BlockCommentThenLineComment" [("Add \"TupleSections\"", "Contains TupleSections code action")]
, codeActionTest "Pragma then line haddock then newline line comment splits line""PragmaThenLineHaddockNewlineLineComment" [("Add \"TupleSections\"", "Contains TupleSections code action")]
46
+
, codeActionTest "does not add pragma after OPTIONS_GHC pragma located after a declaration""OptionsGhcAfterDecl" [("Add \"TupleSections\"", "Contains TupleSections code action")]
47
+
, codeActionTest "adds LANGUAGE with no other pragmas at start ignoring later INLINE pragma""AddPragmaIgnoreInline" [("Add \"TupleSections\"", "Contains TupleSections code action")]
33
48
, codeActionTest "adds LANGUAGE before Doc comments after interchanging pragmas""BeforeDocInterchanging" [("Add \"NamedFieldPuns\"", "Contains NamedFieldPuns code action")]
34
49
, codeActionTest "Add language after altering OPTIONS_GHC and Language""AddLanguagePragmaAfterInterchaningOptsGhcAndLangs" [("Add \"TupleSections\"", "Contains TupleSections code action")]
35
50
, codeActionTest "Add language after pragmas with non standard space between prefix and name""AddPragmaWithNonStandardSpacingInPrecedingPragmas" [("Add \"TupleSections\"", "Contains TupleSections code action")]
0 commit comments