#!/bin/sh

test_btohex() {
  # FIXME: Remove grep when this bug is fixed:
  # https://github.com/sysprog21/rv32emu/issues/561
  result=$("${RV32EMU}" -d - -q tests/btohex | grep -v '^\d' | "${JQ}" .x11)

  test $? -eq 0 && test "${result}" -eq 16693 # 16693 is A5 in ASCII
}