mirror of
https://github.com/espressif/openthread.git
synced 2026-08-30 05:49:54 +00:00
[cli] add helper Interpreter::OutputTableHeader() (#6696)
This commit adds a helper method `OutputTableHeader()` that can be used to print a table header from a given array of column widths and title strings. This is then used in CLI module for different tables (child/neighbor/router table, active/energy scan result, etc).
This commit is contained in:
@@ -35,14 +35,14 @@ setup_leader
|
||||
send "udp open\n"
|
||||
expect_line "Done"
|
||||
send "netstat\n"
|
||||
expect "| Local Address | Peer Address |"
|
||||
expect "| Local Address | Peer Address |"
|
||||
expect "+-------------------------------------------------+-------------------------------------------------+"
|
||||
expect "| [0:0:0:0:0:0:0:0]:0 | [0:0:0:0:0:0:0:0]:0 |"
|
||||
expect_line "Done"
|
||||
send "udp bind :: 10001\n"
|
||||
expect_line "Done"
|
||||
send "netstat\n"
|
||||
expect "| Local Address | Peer Address |"
|
||||
expect "| Local Address | Peer Address |"
|
||||
expect "+-------------------------------------------------+-------------------------------------------------+"
|
||||
expect "| [0:0:0:0:0:0:0:0]:1001 | [0:0:0:0:0:0:0:0]:0 |"
|
||||
expect_line "Done"
|
||||
@@ -50,7 +50,7 @@ set addr [get_ipaddr mleid]
|
||||
send "udp connect $addr 10001\n"
|
||||
expect_line "Done"
|
||||
send "netstat\n"
|
||||
expect "| Local Address | Peer Address |"
|
||||
expect "| Local Address | Peer Address |"
|
||||
expect "+-------------------------------------------------+-------------------------------------------------+"
|
||||
expect -re "\\| \\[0:0:0:0:0:0:0:0\\]:10001 +\\| \\[$addr\\]:10001 +\\|"
|
||||
expect_line "Done"
|
||||
|
||||
Reference in New Issue
Block a user