File tree 3 files changed +8
-6
lines changed
hls-cabal-fmt-plugin/test
hls-cabal-gild-plugin/test
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ test-suite hls-cabal-fmt-plugin-tests
144
144
145
145
if flag(isolateCabalfmtTests)
146
146
build-tool-depends : cabal-fmt :cabal-fmt ^>= 0.1.6
147
+ cpp-options : -Dhls_isolate_cabalfmt_tests
147
148
148
149
-----------------------------
149
150
-- cabal-gild plugin
@@ -194,6 +195,7 @@ test-suite hls-cabal-gild-plugin-tests
194
195
195
196
if flag(isolateCabalGildTests)
196
197
build-tool-depends : cabal-gild :cabal-gild ^>= 1.1
198
+ cpp-options : -Dhls_isolate_cabalgild_tests
197
199
198
200
-----------------------------
199
201
-- cabal plugin
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import Test.Hls
12
12
data CabalFmtFound = Found | NotFound
13
13
14
14
isTestIsolated :: Bool
15
- #if isolateTests
15
+ #if hls_isolate_cabalfmt_tests
16
16
isTestIsolated = True
17
17
#else
18
18
isTestIsolated = False
@@ -21,7 +21,7 @@ isTestIsolated = False
21
21
isCabalFmtFound :: IO CabalFmtFound
22
22
isCabalFmtFound = case isTestIsolated of
23
23
True -> pure Found
24
- False -> do
24
+ False -> do
25
25
cabalFmt <- findExecutable " cabal-fmt"
26
26
pure $ maybe NotFound (const Found ) cabalFmt
27
27
@@ -51,7 +51,7 @@ cabalFmtGolden :: CabalFmtFound -> TestName -> FilePath -> FilePath -> (TextDocu
51
51
cabalFmtGolden NotFound title _ _ _ =
52
52
testCase title $
53
53
assertFailure $ " Couldn't find cabal-fmt on PATH or this is not an isolated run. "
54
- <> " Use cabal flag 'isolateTests ' to make it isolated or install cabal-fmt locally."
54
+ <> " Use cabal flag 'isolateCabalFmtTests ' to make it isolated or install cabal-fmt locally."
55
55
cabalFmtGolden Found title path desc act = goldenWithCabalDocFormatter def cabalFmtPlugin " cabal-fmt" conf title testDataDir path desc " cabal" act
56
56
where
57
57
conf = def
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import Test.Hls
12
12
data CabalGildFound = Found | NotFound
13
13
14
14
isTestIsolated :: Bool
15
- #if isolateTests
15
+ #if hls_isolate_cabalgild_tests
16
16
isTestIsolated = True
17
17
#else
18
18
isTestIsolated = False
@@ -21,7 +21,7 @@ isTestIsolated = False
21
21
isCabalFmtFound :: IO CabalGildFound
22
22
isCabalFmtFound = case isTestIsolated of
23
23
True -> pure Found
24
- False -> do
24
+ False -> do
25
25
cabalGild <- findExecutable " cabal-gild"
26
26
pure $ maybe NotFound (const Found ) cabalGild
27
27
@@ -49,7 +49,7 @@ cabalGildGolden :: CabalGildFound -> TestName -> FilePath -> FilePath -> (TextDo
49
49
cabalGildGolden NotFound title _ _ _ =
50
50
testCase title $
51
51
assertFailure $ " Couldn't find cabal-gild on PATH or this is not an isolated run. "
52
- <> " Use cabal flag 'isolateTests ' to make it isolated or install cabal-gild locally."
52
+ <> " Use cabal flag 'isolateCabalGildTests ' to make it isolated or install cabal-gild locally."
53
53
cabalGildGolden Found title path desc act = goldenWithCabalDocFormatter def cabalGildPlugin " cabal-gild" conf title testDataDir path desc " cabal" act
54
54
where
55
55
conf = def
You can’t perform that action at this time.
0 commit comments