Skip to content

Commit 9631cb3

Browse files
committed
add test
1 parent 42c0c2b commit 9631cb3

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# cabal v2-run
2+
Resolving dependencies...
3+
Build profile: -w ghc-<GHCVER> -O2
4+
In order, the following will be built:
5+
- fake-package-0 (exe:cabal-script-script.hs) (first run)
6+
Configuring executable 'cabal-script-script.hs' for fake-package-0..
7+
Building executable 'cabal-script-script.hs' for fake-package-0..
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Test.Cabal.Prelude
2+
3+
main = cabalTest $ do
4+
res <- cabal' "v2-run" ["script.hs"]
5+
assertOutputContains "Hello World" res
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env cabal
2+
{- cabal:
3+
build-depends: base
4+
-}
5+
{- project:
6+
optimization: 2
7+
-}
8+
9+
main :: IO ()
10+
main = putStrLn "Hello World"

0 commit comments

Comments
 (0)