Files
runner-images-sangeeth/images/linux/scripts/tests/Haskell.Tests.ps1
Nikita Bykov 2c96d280ed [Ubuntu] Rework haskell.sh to install Cabal using GHCup (#2636)
* reworked haskell installation

* added comment

* resolved comments and added symlink

* fixed haskell.sh

* update haskell.sh

* update installation

* added error suppressing

* reverted ghc intallation

* added comments

Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
2021-02-19 10:20:15 +03:00

35 lines
931 B
PowerShell

Describe "Haskell" {
$GHCCommonPath = "/opt/ghc"
$GHCVersions = Get-ChildItem -Path $GHCCommonPath | Where-Object { $_.Name -match "\d+\.\d+" }
$testCase = @{ GHCVersions = $GHCVersions }
It "GHC directory contains two version of GHC" -TestCases $testCase {
param ([object] $GHCVersions)
$GHCVersions.Count | Should -Be 2
}
$testCases = $GHCVersions | ForEach-Object { @{ GHCPath = "${_}/bin/ghc"} }
It "GHC version <GHCPath>" -TestCases $testCases {
param ([string] $GHCPath)
"$GHCPath --version" | Should -ReturnZeroExitCode
}
It "GHCup" {
"ghcup --version" | Should -ReturnZeroExitCode
}
It "Default GHC" {
"ghc --version" | Should -ReturnZeroExitCode
}
It "Cabal" {
"cabal --version" | Should -ReturnZeroExitCode
}
It "Stack" {
"stack --version" | Should -ReturnZeroExitCode
}
}