hls-test-utils 2.3.0.0 → 2.4.0.0
raw patch · 3 files changed
+12/−4 lines, 3 filesdep ~ghcidedep ~hls-plugin-api
Dependency ranges changed: ghcide, hls-plugin-api
Files
- hls-test-utils.cabal +3/−3
- src/Test/Hls.hs +1/−0
- src/Test/Hls/Util.hs +8/−1
hls-test-utils.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: hls-test-utils-version: 2.3.0.0+version: 2.4.0.0 synopsis: Utilities used in the tests of Haskell Language Server description: Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>@@ -42,9 +42,9 @@ , directory , extra , filepath- , ghcide == 2.3.0.0+ , ghcide == 2.4.0.0 , hls-graph- , hls-plugin-api == 2.3.0.0+ , hls-plugin-api == 2.4.0.0 , lens , lsp ^>=2.2 , lsp-test ^>=0.16
src/Test/Hls.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-}
src/Test/Hls/Util.hs view
@@ -25,6 +25,7 @@ , knownBrokenOnWindows , knownBrokenForGhcVersions , knownBrokenInEnv+ , knownBrokenInSpecificEnv , onlyWorkForGhcVersions -- * Extract code actions , fromAction@@ -123,10 +124,16 @@ | isMac = MacOS | otherwise = Linux --- | Mark as broken if /any/ of environmental spec mathces the current environment.+-- | Mark as broken if /any/ of the environmental specs matches the current environment. knownBrokenInEnv :: [EnvSpec] -> String -> TestTree -> TestTree knownBrokenInEnv envSpecs reason | any matchesCurrentEnv envSpecs = expectFailBecause reason+ | otherwise = id++-- | Mark as broken if /all/ environmental specs match the current environment.+knownBrokenInSpecificEnv :: [EnvSpec] -> String -> TestTree -> TestTree+knownBrokenInSpecificEnv envSpecs reason+ | all matchesCurrentEnv envSpecs = expectFailBecause reason | otherwise = id knownBrokenOnWindows :: String -> TestTree -> TestTree