Skip to content

Commit 1dd54a5

Browse files
authored
Fix references to old CPP names in tests, update tests (#4159)
1 parent 097d990 commit 1dd54a5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
packages:
22
testdata/
3-
info-util/
3+
testdata/info-util/

test/functional/Progress.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ tests =
3737

3838
(codeLensResponse, activeProgressTokens) <- expectProgressMessagesTill
3939
(responseForId SMethod_TextDocumentCodeLens lspId)
40-
["Setting up testdata (for T1.hs)", "Processing", "Indexing"]
40+
["Setting up testdata (for T1.hs)", "Processing"]
4141
[]
4242

4343
-- this is a test so exceptions result in fails
@@ -59,15 +59,15 @@ tests =
5959
void configurationRequest
6060
setHlsConfig (formatLspConfig "ormolu")
6161
doc <- openDoc "Format.hs" "haskell"
62-
expectProgressMessages ["Setting up testdata (for Format.hs)", "Processing", "Indexing"] []
62+
expectProgressMessages ["Setting up format (for Format.hs)", "Processing", "Indexing"] []
6363
_ <- sendRequest SMethod_TextDocumentFormatting $ DocumentFormattingParams Nothing doc (FormattingOptions 2 True Nothing Nothing Nothing)
6464
expectProgressMessages ["Formatting Format.hs"] []
6565
, requiresFourmoluPlugin $ testCase "fourmolu plugin sends progress notifications" $ do
6666
runSessionWithConfig (def { ignoreConfigurationRequests = False }) hlsLspCommand progressCaps "test/testdata/format" $ do
6767
void configurationRequest
6868
setHlsConfig (formatLspConfig "fourmolu")
6969
doc <- openDoc "Format.hs" "haskell"
70-
expectProgressMessages ["Setting up testdata (for Format.hs)", "Processing", "Indexing"] []
70+
expectProgressMessages ["Setting up format (for Format.hs)", "Processing", "Indexing"] []
7171
_ <- sendRequest SMethod_TextDocumentFormatting $ DocumentFormattingParams Nothing doc (FormattingOptions 2 True Nothing Nothing Nothing)
7272
expectProgressMessages ["Formatting Format.hs"] []
7373
]

test/utils/Test/Hls/Flags.hs

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Test.Hls (TestTree, ignoreTestBecause)
1010

1111
-- | Disable test unless the eval flag is set
1212
requiresEvalPlugin :: TestTree -> TestTree
13-
#if eval
13+
#if hls_eval
1414
requiresEvalPlugin = id
1515
#else
1616
requiresEvalPlugin = ignoreTestBecause "Eval plugin disabled"
@@ -19,23 +19,23 @@ requiresEvalPlugin = ignoreTestBecause "Eval plugin disabled"
1919
-- * Formatters
2020
-- | Disable test unless the floskell flag is set
2121
requiresFloskellPlugin :: TestTree -> TestTree
22-
#if floskell
22+
#if hls_floskell
2323
requiresFloskellPlugin = id
2424
#else
2525
requiresFloskellPlugin = ignoreTestBecause "Floskell plugin disabled"
2626
#endif
2727

2828
-- | Disable test unless the fourmolu flag is set
2929
requiresFourmoluPlugin :: TestTree -> TestTree
30-
#if fourmolu
30+
#if hls_fourmolu
3131
requiresFourmoluPlugin = id
3232
#else
3333
requiresFourmoluPlugin = ignoreTestBecause "Fourmolu plugin disabled"
3434
#endif
3535

3636
-- | Disable test unless the ormolu flag is set
3737
requiresOrmoluPlugin :: TestTree -> TestTree
38-
#if ormolu
38+
#if hls_ormolu
3939
requiresOrmoluPlugin = id
4040
#else
4141
requiresOrmoluPlugin = ignoreTestBecause "Ormolu plugin disabled"

0 commit comments

Comments
 (0)