The
match_max command is the one you want. To test out whether
expect is really discarding buffer contents because it filled up, you can also try adding a [tt]full_buffer[/tt] pattern to your
expect command, at least for testing purposes. See page 151 in the "Exploring Expect" book for more information, but basically if the [tt]full_buffer[/tt] pattern matches, Expect dumps all of the unmatched input into
expect_out(buffer):
Code:
expect {
$mypattern {
myaction
}
full_buffer {
# The buffer filled up without matching a pattern.
# The buffer was dumped into expect_out(buffer).
puts "Unmatched input: $expect_out(buffer)"
}
}
You might also want to turn on Expect's diagnostics to see what it really is and isn't matching. To do so, execute
exp_internal 1. ("Exploring Expect" page 166 and beyond.) Just be aware that
exp_internal generates a
lot of output!
- Ken Jones, President, ken@avia-training.com
Avia Training and Consulting,
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax