mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-04 13:36:10 +00:00

When building argv for matched command, only the last node was being copied to argv; the rest were added by reference. Additionally the regex for certain tokens was too restrictive and disallowed characters allowed by the old parser; these have been reinstated. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
27 lines
440 B
Plaintext
Executable File
27 lines
440 B
Plaintext
Executable File
#!/usr/bin/expect
|
|
|
|
# takes a list of command format strings
|
|
# and feeds them to the test grammar
|
|
# parser
|
|
|
|
set f [open [lindex $argv 0]]
|
|
set cmds [split [read $f] "\n"]
|
|
close $f
|
|
|
|
spawn vtysh
|
|
|
|
foreach command $cmds {
|
|
expect {
|
|
"dell-s6000-16#" {
|
|
send "grammar parse $command\r"
|
|
}
|
|
"Grammar error" {
|
|
send_user "$command"
|
|
send "exit\r"
|
|
exit
|
|
}
|
|
}
|
|
}
|
|
|
|
interact
|