summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtest.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/test.sh b/test.sh
index 165308404931..83e1e33d24f5 100755
--- a/test.sh
+++ b/test.sh
@@ -49,4 +49,24 @@ if [[ $helloWorld != 'Hello, world!' ]]; then
exit 1
fi
+printf '%s\n' 'Testing GraalWASM...'
+
+PATH=$PATH:/usr/lib/emscripten
+
+cat > hello.c << 'EOF'
+#include <stdio.h>
+
+int main() {
+ printf("Hello, WASM!\n");
+ return 0;
+}
+EOF
+emcc -o hello.wasm hello.c || exit
+
+helloWorld=$(wasm --Builtins=wasi_snapshot_preview1 hello.wasm) || exit
+if [[ $helloWorld != 'Hello, WASM!' ]]; then
+ printf 'expected "Hello, WASM!", got %q\n' "$helloWorld"
+ exit 1
+fi
+
printf '%s\n' 'Done.'