From 4aa7dc4ab65b249d36ef9f6bbfee8b842aec8348 Mon Sep 17 00:00:00 2001 From: Oxore Date: Sun, 23 Apr 2023 21:10:33 +0300 Subject: Split disasm into procedures by the highest nibble --- test.bash | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test.bash') diff --git a/test.bash b/test.bash index 408efc3..1ac1bb1 100644 --- a/test.bash +++ b/test.bash @@ -10,6 +10,9 @@ TEST_DIR=/tmp/m68k-disasm-tests TRACE_FILE=${TEST_DIR}/trace.txt set -e +CRED="\033[31m" +CGREEN="\033[32m" +CRST="\033[39m" rm -rf ${TEST_DIR} mkdir -p ${TEST_DIR} @@ -29,14 +32,17 @@ run_test_simple() { ${AS} -o ${file_as_o} ${file_asm} ${OBJCOPY} ${file_as_o} -O binary ${file_as_bin} if ! cmp ${file_orig_bin} ${file_as_bin} >/dev/null 2>&1; then - echo "FAIL" + echo -e "${CRED}FAIL${CRST}: output and input binaries do not match" cat ${file_asm} echo ${file_orig_bin} hexdump -Cv ${file_orig_bin} | head -n1 echo ${file_as_bin} hexdump -Cv ${file_as_bin} | head -n1 + elif grep ".short" ${file_asm} >/dev/null 2>&1; then + echo -e "${CRED}FAIL${CRST}: .short emitted" + cat ${file_asm} else - echo "OK" + echo -e "${CGREEN}OK${CRST}" #cat ${file_asm} fi } -- cgit v1.2.3