Skip to content

Commit 2e298ee

Browse files
committed
Add test for Haskell globalLibraries option
1 parent 7d90d4b commit 2e298ee

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

src/haskell/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"type": "string",
4141
"proposals": [
4242
"",
43-
"hspec hspec-contrib"
43+
"hspec hspec-contrib QuickCheck HUnit"
4444
],
4545
"default": "",
4646
"description": "Libraries to install via `cabal install --lib`, such as `hspec` for testing. Separate with spaces. This will add significant initial build time."

test/haskell/scenarios.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,13 @@
44
"features": {
55
"haskell": {}
66
}
7+
},
8+
"test_libraries": {
9+
"image": "mcr.microsoft.com/devcontainers/base:debian",
10+
"features": {
11+
"haskell": {
12+
"globalLibraries": "hspec hspec-contrib QuickCheck HUnit"
13+
}
14+
}
715
}
816
}

test/haskell/test_libraries.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
source dev-container-features-test-lib
6+
7+
check "cabal install --lib" ghc -e "import Test.Hspec; import Test.QuickCheck"
8+
9+
reportResults

0 commit comments

Comments
 (0)