浏览代码

Add basic test for cabal and ghci

Moghedrin 10 年之前
父节点
当前提交
e378157f7d

+ 5 - 0
test/tests/haskell-cabal/container.sh

@@ -0,0 +1,5 @@
+#!/bin/bash
+
+set -e
+
+cabal install base

+ 9 - 0
test/tests/haskell-cabal/run.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+
+dir="$(readlink -f "$(dirname "$BASH_SOURCE")")"
+
+inContainerPath="/tmp/bash"
+cmd=( "$inContainerPath/container.sh" )
+
+docker run --rm -v "$dir":"$inContainerPath":ro -w "$inContainerPath" --entrypoint bash "$1" "${cmd[@]}"

+ 5 - 0
test/tests/haskell-ghci/container.sh

@@ -0,0 +1,5 @@
+#!/bin/bash
+
+set -e
+
+echo "" | ghci

+ 9 - 0
test/tests/haskell-ghci/run.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+
+dir="$(readlink -f "$(dirname "$BASH_SOURCE")")"
+
+inContainerPath="/tmp/bash"
+cmd=( "$inContainerPath/container.sh" )
+
+docker run --rm -v "$dir":"$inContainerPath":ro -w "$inContainerPath" --entrypoint bash "$1" "${cmd[@]}"