]>
Commit | Line | Data |
---|---|---|
1a8c390d | 1 | #!/usr/bin/expect |
6d53a10e | 2 | |
1a8c390d QY |
3 | # takes a list of command format strings |
4 | # and feeds them to the test grammar | |
5 | # parser | |
6 | ||
7 | set f [open [lindex $argv 0]] | |
6d53a10e QY |
8 | set cmds [split [read $f] "\n"] |
9 | close $f | |
10 | ||
11 | spawn vtysh | |
12 | ||
13 | foreach command $cmds { | |
1a8c390d QY |
14 | expect { |
15 | "dell-s6000-16#" { | |
16 | send "grammar parse $command\r" | |
17 | } | |
18 | "Grammar error" { | |
19 | send_user "$command" | |
20 | send "exit\r" | |
21 | exit | |
22 | } | |
23 | } | |
6d53a10e QY |
24 | } |
25 | ||
26 | interact |