[cli] add '-x' flag to tcp client to send hexadecimal data (#11218)

This adds the `-x` flag to the `tcp send` command so send specific
data defined by a hexadecimal string.  The purpose is to use this in
testing, for example to emulate HTTP GET requests.
This commit is contained in:
Esko Dijk
2025-02-07 10:50:15 -08:00
committed by GitHub
parent 320b50538f
commit a0243fa01a
2 changed files with 38 additions and 9 deletions
+7
View File
@@ -80,6 +80,13 @@ expect_line "Done"
switch_node 1
expect "TCP: Received 5 bytes: world"
send "tcp send -x 546573740d0a4865780d0a\n"
expect_line "Done"
switch_node 2
expect "TCP: Received 11 bytes: Test\r\nHex\r\n"
switch_node 1
send "tcp sendend\n"
expect_line "Done"
send "tcp send more\n"