mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-06 12:18:04 +11:00
af2c561c6b
Up until now, invalid source input had undefined behavior. We're now beginning to define that behavior so that zasm can be a bit more usable.
21 lines
309 B
Bash
Executable File
21 lines
309 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# no "set -e" because we test errors
|
|
|
|
ZASM=../../emul/zasm/zasm
|
|
|
|
chkerr() {
|
|
echo "Check that '$1' results in error $2"
|
|
${ZASM} <<< $1 > /dev/null
|
|
local res=$?
|
|
if [[ $res == $2 ]]; then
|
|
echo "Good!"
|
|
else
|
|
echo "$res != $2"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
chkerr "foo" 1
|
|
|