/[dejagnu]/dejagnu/example/calc/testsuite/config/unix.exp
ViewVC logotype

Diff of /dejagnu/example/calc/testsuite/config/unix.exp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by bje, Sun Aug 17 23:00:08 2003 UTC revision 1.4 by bje, Tue Aug 19 00:11:43 2003 UTC
# Line 25  if ![info exists prompt] then { Line 25  if ![info exists prompt] then {
25  #  #
26    
27  proc calc_version {} {  proc calc_version {} {
28          global CALC      global CALC
29          global prompt      global prompt
30          set tmp [exec echo "version" | $CALC]      set tmp [exec echo "version" | $CALC]
31          regexp "$prompt *(\[^\n\]*)\n.*" $tmp tmp version      regexp "$prompt *(\[^\n\]*)\n.*" $tmp tmp version
32          clone_output "[which $CALC] version $version\n"      clone_output "[which $CALC] version $version\n"
33  }  }
34  #  #
35  # calc_load -- loads the program  # calc_load -- loads the program
36  #  #
37  proc calc_load { arg } {  proc calc_load { arg } {
38          #      #
39  }  }
40    
41  #  #
42  # calc_exit -- quit and cleanup  # calc_exit -- quit and cleanup
43  #  #
44  proc calc_exit {} {  proc calc_exit {} {
45          send "quit\n"      send "quit\n"
46  }  }
47    
48  #  #
49  # calc_start -- start calc running  # calc_start -- start calc running
50  #  #
51  proc calc_start {} {  proc calc_start {} {
52          global CALC      global CALC
53          global prompt      global prompt
54          global spawn_id      global spawn_id
55          global verbose      global verbose
56    
57          if { $verbose > 1 } {      if { $verbose > 1 } {
58                  send_user "starting $CALC\n"          send_user "starting $CALC\n"
59          }      }
60          spawn $CALC      spawn $CALC
61          expect {      expect {
62                  -re "No such file.*" { perror "Can't start $CALC"; exit 1 }          -re "No such file.*" { perror "Can't start $CALC"; exit 1 }
63                  -re "$prompt$" { }          -re "$prompt$" { }
64                  timeout { perror "Failed to spawn $CALC (timeout)"; exit 1 }          timeout { perror "Failed to spawn $CALC (timeout)"; exit 1 }
65          }      }
66  }  }
67    
68  calc_start  calc_start

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26