summaryrefslogtreecommitdiff
path: root/p/haskell-hgettext/debian/tests/cabal-install-compatibility
blob: 3a836d55285b679e351fc1e4d9e60d6805af0201 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
set -e

# Create the example package
cd debian/tests
cp Setup.hs example.cabal example.hs $ADTTMP
cd $ADTTMP
mkdir example
mv Setup.hs example.cabal example.hs example
cd example
touch LICENSE.txt # Cabal expects this

CABAL="cabal --config-file=/dev/null"

# These tests are needed to make sure the cabal libraries used to compile
# cabal-install and hgettext are compatible.
# Test whether we can configure this
$CABAL configure
# Test whether we can build this
$CABAL build
# Test whether we can compile to repl
/bin/echo -e 'putStrLn "works"\n:quit' | $CABAL repl
# Test whether we can install
mkdir $ADTTMP/test-install
$CABAL install --prefix $ADTTMP/test-install