source: sans/utils/bt5/icpgui/test @ 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: 401 bytes
Line 
1#!/usr/bin/wish
2
3package require Tk
4package require Expect
5
6spawn "/usr/local/icp/bin/icp"
7set icp $spawn_id
8
9text .icp -relief sunken -bd 1
10pack .icp
11
12expect_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
22bind Text <Any-Enter> {focus %W}
23bind .icp <Any-Keypress> {exp_send -i $icp "%A"}
Note: See TracBrowser for help on using the repository browser.