File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed 
hls-cabal-fmt-plugin/test 
hls-cabal-gild-plugin/test Expand file tree Collapse file tree 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
144144
145145  if flag(isolateCabalfmtTests)
146146    build-tool-depends : cabal-fmt :cabal-fmt ^>= 0.1.6 
147+     cpp-options : -Dhls_isolate_cabalfmt_tests
147148
148149----------------------------- 
149150-- cabal-gild plugin 
@@ -194,6 +195,7 @@ test-suite hls-cabal-gild-plugin-tests
194195
195196  if flag(isolateCabalGildTests)
196197    build-tool-depends : cabal-gild :cabal-gild ^>= 1.1 
198+     cpp-options : -Dhls_isolate_cabalgild_tests
197199
198200----------------------------- 
199201-- cabal plugin 
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import           Test.Hls
1212data  CabalFmtFound  =  Found  | NotFound 
1313
1414isTestIsolated  ::  Bool 
15- #if  isolateTests 
15+ #if  hls_isolate_cabalfmt_tests 
1616isTestIsolated =  True 
1717#else 
1818isTestIsolated =  False 
@@ -21,7 +21,7 @@ isTestIsolated = False
2121isCabalFmtFound  ::  IO   CabalFmtFound 
2222isCabalFmtFound =  case  isTestIsolated of 
2323  True   ->  pure  Found 
24-   False ->  do 
24+   False   ->  do 
2525    cabalFmt <-  findExecutable " cabal-fmt" 
2626    pure  $  maybe  NotFound  (const  Found ) cabalFmt
2727
@@ -51,7 +51,7 @@ cabalFmtGolden :: CabalFmtFound -> TestName -> FilePath -> FilePath -> (TextDocu
5151cabalFmtGolden NotFound  title _ _ _ = 
5252  testCase title $ 
5353    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." 
5555cabalFmtGolden Found  title path desc act =  goldenWithCabalDocFormatter def cabalFmtPlugin " cabal-fmt"   conf title testDataDir path desc " cabal"   act
5656  where 
5757    conf =  def
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import           Test.Hls
1212data  CabalGildFound  =  Found  | NotFound 
1313
1414isTestIsolated  ::  Bool 
15- #if  isolateTests 
15+ #if  hls_isolate_cabalgild_tests 
1616isTestIsolated =  True 
1717#else 
1818isTestIsolated =  False 
@@ -21,7 +21,7 @@ isTestIsolated = False
2121isCabalFmtFound  ::  IO   CabalGildFound 
2222isCabalFmtFound =  case  isTestIsolated of 
2323  True   ->  pure  Found 
24-   False ->  do 
24+   False   ->  do 
2525    cabalGild <-  findExecutable " cabal-gild" 
2626    pure  $  maybe  NotFound  (const  Found ) cabalGild
2727
@@ -49,7 +49,7 @@ cabalGildGolden :: CabalGildFound -> TestName -> FilePath -> FilePath -> (TextDo
4949cabalGildGolden NotFound  title _ _ _ = 
5050  testCase title $ 
5151    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." 
5353cabalGildGolden Found  title path desc act =  goldenWithCabalDocFormatter def cabalGildPlugin " cabal-gild"   conf title testDataDir path desc " cabal"   act
5454  where 
5555    conf =  def
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments