Fork of daniellemaywood.uk/gleam — Wasm codegen work
546 B
26 lines
1#!/bin/sh
2
3set -eu
4
5g() {
6 echo "Running: gleam $@"
7 cargo run --quiet -- "$@"
8}
9
10echo This should succeed regardless of target as it is a dependency module
11g run --module=hello_joe --target=erlang
12g run --module=hello_joe --target=javascript
13
14echo This should succeed as JavaScript is supported
15g build --target=javascript
16g run --target=javascript
17
18echo This should fail as Erlang is not supported
19if g build --target=erlang; then
20 echo "Expected build to fail"
21 exit 1
22fi
23if g run --target=erlang; then
24 echo "Expected run to fail"
25 exit 1
26fi