Fix grep invocation in tests

This commit is contained in:
Wesley Moore 2025-02-10 14:03:04 +10:00
parent 947f1fca89
commit 4e67ba4a7c
No known key found for this signature in database

View file

@ -3,7 +3,7 @@
test_btohex() {
# FIXME: Remove grep when this bug is fixed:
# https://github.com/sysprog21/rv32emu/issues/561
result=$("${RV32EMU}" -d - -q tests/btohex.elf | grep -v '^\d' | "${JQ}" .x11)
result=$("${RV32EMU}" -d - -q tests/btohex.elf | grep -v '^[0-9]' | "${JQ}" .x11)
# 16693 is 5A in ASCII (reversed from input due to little endian)
test $? -eq 0 && test "${result}" -eq 13633
@ -12,7 +12,7 @@ test_btohex() {
test_tohex() {
# FIXME: Remove grep when this bug is fixed:
# https://github.com/sysprog21/rv32emu/issues/561
result=$("${RV32EMU}" -q tests/tohex.elf | grep -v '^\d')
result=$("${RV32EMU}" -q tests/tohex.elf | grep -v '^[0-9]')
test $? -eq 0 && test "${result}" = "CAFEFEED"
}