mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-10 03:08:06 +11:00
24 lines
404 B
Bash
24 lines
404 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
set -e
|
||
|
|
||
|
TMPFILE=$(mktemp)
|
||
|
SCAS=scas
|
||
|
ZASM=../emul/zasm
|
||
|
|
||
|
./geninstrs.py | \
|
||
|
while read line; do
|
||
|
echo $line | tee "${TMPFILE}"
|
||
|
EXPECTED=$($SCAS -o - "${TMPFILE}" | xxd)
|
||
|
ACTUAL=$(echo $line | $ZASM | xxd)
|
||
|
if [ "$ACTUAL" == "$EXPECTED" ]; then
|
||
|
echo ok
|
||
|
else
|
||
|
echo actual
|
||
|
echo $ACTUAL
|
||
|
echo expected
|
||
|
echo $EXPECTED
|
||
|
exit 1
|
||
|
fi
|
||
|
done
|