#!/bin/bash

set -e

# Have to comment out when testing non-0 return values
# from test programs:
# set -e # quit on errors

F=meow5

# rebuild
./build.sh

# execute the 'foo' elf maker script in meow5!
#echo ': foo 42 exit ; make_elf foo' | ./$F
echo ': foo "foo\n" print  exit ; make_elf foo' | ./$F

# debug it
#gdb foo -q --command=dbgfoo.gdb

# look at it with mez!
../mez/mez

# try to run it
echo "Running..."
./foo
echo "(Exited with code $?)"
