#!/bin/bash for f in test/*.asm; do base=$(echo "$f" | cut -d. -f1) args="" for i in $base.in.*; do c=$(echo "$i" | cut -d. -f3) args="$args --in.$c $i" done for i in $base.out.*; do c=$(echo "$i" | cut -d. -f3) args="$args --out.$c /tmp/tis100-test.out.$c" done ./tis100 "$f" $args if [ $? -ne 0 ]; then echo "$f" else bad=0 for c in "abcdefghijklmnopqrstuvwyxz"; do out="$base.in.$c" tmp="/tmp/tis100-test.out.$c" if [ -e "$out" -a -e "$tmp" ] && ! diff "$out" "$tmp"; then cat "$tmp" | xxd 1>&2 cat "$out" | xxd 1>&2 bad=1 fi done [ $bad -ne 0 ] && echo "$f" fi done :