source: sans/utils/bt5/icpgui/test1 @ 73

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: 543 bytes
RevLine 
[73]1#!/usr/bin/expectk
2
3#log_user 0
4eval spawn -noecho "/usr/local/icp/bin/icp"
5set icpid $spawn_id
6text .icp -relief sunken -bd 1
7entry .input -relief sunken -bd 1
8pack .icp
9pack .input -fill x
10
11expect_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
20bind Text <Any-Enter> {focus %W}
21bind .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.