Last change
on this file since 120 was
73,
checked in by ajj, 16 years ago
|
Adding inital test code using expectk
|
-
Property svn:executable set to
*
|
File size:
543 bytes
|
Line | |
---|
1 | #!/usr/bin/expectk |
---|
2 | |
---|
3 | #log_user 0 |
---|
4 | eval spawn -noecho "/usr/local/icp/bin/icp" |
---|
5 | set icpid $spawn_id |
---|
6 | text .icp -relief sunken -bd 1 |
---|
7 | entry .input -relief sunken -bd 1 |
---|
8 | pack .icp |
---|
9 | pack .input -fill x |
---|
10 | |
---|
11 | expect_background { |
---|
12 | -i $icpid -re "\[^\x0d]+" { |
---|
13 | .icp insert end $expect_out(0,string) |
---|
14 | } |
---|
15 | -i $any_spawn_id "\x0d" { |
---|
16 | } |
---|
17 | -i $any_spawn_id "exit" { exit 0 } |
---|
18 | } |
---|
19 | |
---|
20 | bind Text <Any-Enter> {focus %W} |
---|
21 | bind .input <Key-Return> {exp_send -i $icpid [ .input get]; exp_send -i $icpid "\r"; .input delete 0 end } |
---|
Note: See
TracBrowser
for help on using the repository browser.