Browse Source

Merge pull request #1077 from MBonell/596-test-hylang-hello-world

Closes #596: Test for Hylang image
yosifkit 10 years ago
parent
commit
48d5bc6526

+ 1 - 0
test/config.sh

@@ -52,6 +52,7 @@ imageTests+=(
 	'
 	'
 	[hylang]='
 	[hylang]='
 		hylang-sh
 		hylang-sh
+		hylang-hello-world
 	'
 	'
 	[java]='
 	[java]='
 	'
 	'

+ 1 - 0
test/tests/hylang-hello-world/expected-std-out.txt

@@ -0,0 +1 @@
+Hello World!

+ 1 - 0
test/tests/hylang-hello-world/hello-world.hy

@@ -0,0 +1 @@
+(print "Hello World!")

+ 8 - 0
test/tests/hylang-hello-world/run.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+
+image="$1"
+dirTest="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+dirContainer='/usr/src/hy'
+
+docker run --rm -v "$dirTest":"$dirContainer":ro -w "$dirContainer" "$image" hy hello-world.hy