Skip to content

Commit 9b36eed

Browse files
dhalbertdpgeorge
authored andcommitted
tests/run-tests.py: Fix hex parsing of {\xnn} escapes.
Signed-off-by: Dan Halbert <halbert@halwitz.org>
1 parent fa17886 commit 9b36eed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/run-tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,8 @@ def get(required=False):
489489
return rv
490490

491491
def send_get(what):
492-
# Detect {\x00} pattern and convert to ctrl-key codes.
493-
ctrl_code = lambda m: bytes([int(m.group(1))])
492+
# Detect hex {\x00} pattern and convert to ctrl-key codes.
493+
ctrl_code = lambda m: bytes([int(m.group(1), 16)])
494494
what = re.sub(rb"{\\x(\d\d)}", ctrl_code, what)
495495

496496
os.write(master, what)

0 commit comments

Comments
 (0)