mirror of
https://github.com/espressif/openthread.git
synced 2026-09-04 08:10:11 +00:00
[test] enhance parsing addresses (#6045)
Expect sometimes matches the pattern before a line is fully printed to TTY. As a result, the address returned may not be accurate. This commit fixes this issue by matching line breaks.
This commit is contained in:
@@ -32,12 +32,12 @@ source "tests/scripts/expect/_common.exp"
|
||||
spawn_node 1
|
||||
|
||||
send "networktime 20 200\n"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
send "networktime\n"
|
||||
expect -re {Network Time: \d+us \((unsynchronized|resync needed|synchronized)\)}
|
||||
expect "Time Sync Period: 20s"
|
||||
expect "XTAL Threshold: 200ppm"
|
||||
expect "Done"
|
||||
expect_line "Done"
|
||||
send "networktime something_invalid\n"
|
||||
expect "Error 7: InvalidArgs"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user