Last change
on this file since 73 was
73,
checked in by ajj, 16 years ago
|
Adding inital test code using expectk
|
-
Property svn:executable set to
*
|
File size:
401 bytes
|
Line | |
---|
1 | #!/usr/bin/wish |
---|
2 | |
---|
3 | package require Tk |
---|
4 | package require Expect |
---|
5 | |
---|
6 | spawn "/usr/local/icp/bin/icp" |
---|
7 | set icp $spawn_id |
---|
8 | |
---|
9 | text .icp -relief sunken -bd 1 |
---|
10 | pack .icp |
---|
11 | |
---|
12 | expect_background{ |
---|
13 | -i $icp -re "\[^\x0d]+" { |
---|
14 | .icp insert end $expect_out(0,string) |
---|
15 | .icp yview -pickplace insert |
---|
16 | } |
---|
17 | -i $any_spawn_id "\x0d" { |
---|
18 | #discard \r |
---|
19 | } |
---|
20 | } |
---|
21 | |
---|
22 | bind Text <Any-Enter> {focus %W} |
---|
23 | bind .icp <Any-Keypress> {exp_send -i $icp "%A"} |
---|
Note: See
TracBrowser
for help on using the repository browser.