From 4e67ba4a7c49e38f234d73c7649a43fc36996ab0 Mon Sep 17 00:00:00 2001
From: Wesley Moore <wes@wezm.net>
Date: Mon, 10 Feb 2025 14:03:04 +1000
Subject: [PATCH] Fix grep invocation in tests

---
 tests/test_hex.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_hex.sh b/tests/test_hex.sh
index 0ad1be0..3340d10 100644
--- a/tests/test_hex.sh
+++ b/tests/test_hex.sh
@@ -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"
 }