[test] add expect tests for ipmaddr, neighbor, leaderdata (#5097)

This commit is contained in:
Moandor
2020-06-15 10:19:08 -07:00
committed by GitHub
parent 30f40fc0fa
commit 4910f91e8c
3 changed files with 144 additions and 4 deletions
+16 -4
View File
@@ -27,11 +27,19 @@
# POSSIBILITY OF SUCH DAMAGE.
#
spawn $env(OT_COMMAND) 1
source "tests/scripts/expect/_multinode.exp"
set timeout 1
expect_after {
timeout { exit 1 }
}
setup_nodes
set spawn_id $spawn_1
send "leaderdata\n"
expect -re {Partition ID: \d+}
expect -re {Weighting: \d+}
expect -re {Data Version: \d+}
expect -re {Stable Data Version: \d+}
expect -re {Leader Router ID: \d+}
expect "Done"
send "help\n"
expect "Done"
@@ -54,6 +62,8 @@ send "delaytimermin 1 2\n"
send "counters mac 1\n"
expect "Error 7: InvalidArgs"
send "ifconfig down\n"
expect "Done"
send "ifconfig\n"
expect "down"
expect "Done"
@@ -132,3 +142,5 @@ send "route\n"
expect "0:0:0:0::/64 s low"
send "route remove ::/64\n"
expect "Done"
dispose_nodes