#!/bin/sh
#
#  Test-opts -- test some Icon command options

#  prepend Icon binary directory to path
PATH=../../bin:$PATH

exec 2>&1
set -e -x

rm -f hello.u? hello
icont hello -x
./hello north

rm -f hello.u? hello olleh
icont -u -s -o olleh hello.icn -x south
./olleh east

rm -f hello.u? hello olleh
icont -c -t -s hello
icont -u -s hello.u -x west

rm -f hello.u? hello
icont -X hello.icn world

rm -f hello.u? hello
echo '#!../../bin/icont -X' | cat - hello.icn > hello
chmod +x hello
./hello galaxy

rm -f hello.u? hello
echo '#!/usr/bin/env icon' | cat - hello.icn > hello
chmod +x hello
./hello universe

rm -f hello.u? hello
icon -P 'procedure main(); write("HOWDY!"); end'

: done
