From a7c8d209c6d1ee3fc28a35af5655b96047b65aac Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Fri, 14 May 2021 12:20:12 +0300 Subject: [PATCH] [windows] Add a test to make sure version 9 is the default one (#3377) --- images/win/scripts/Tests/Haskell.Tests.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/images/win/scripts/Tests/Haskell.Tests.ps1 b/images/win/scripts/Tests/Haskell.Tests.ps1 index 4bddc57af..903e95da2 100644 --- a/images/win/scripts/Tests/Haskell.Tests.ps1 +++ b/images/win/scripts/Tests/Haskell.Tests.ps1 @@ -36,6 +36,11 @@ Describe "Haskell" { "ghc --version" | Should -MatchCommandOutput $defaultGhcShortVersion } + # Sometimes choco doesn't return version 9, need to check it explicitly https://github.com/chocolatey/choco/issues/2271 + It "Default GHC version is 9" -TestCases $ghcDefaultCases { + "ghc --version" | Should -MatchCommandOutput "9(\.\d+){2,}" + } + It "Cabal is installed" { "cabal --version" | Should -ReturnZeroExitCode }