1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
# expect/tcl code to test the das scanner
# jhrg
#
# $Log: scanner.5.exp,v $
# Revision 1.1 1996/07/16 16:54:36 jimg
# Added.
#
#
global comp_output # contains output from das-test_start
global verbose # this and srcdir are set by runtest.exp
global srcdir
set test_name scanner.5
set prompt "das-test:"
set timeout 2
set pass 1
das-test_start s
expect {
"${prompt} " {
}
timeout {
send_user "Timeout\n"
set pass 0
}
}
if {$pass} {
set thing "byte\r\n"
send $thing
expect {
-re ".*BYTE\r\n${prompt} $" {
}
timeout {
send_user "Timeout\n"
set pass 0
}
}
}
if {$pass} {
set thing "Byte\r\n"
send $thing
expect {
-re ".*BYTE\r\n${prompt} $" {
}
timeout {
send_user "Timeout\n"
set pass 0
}
}
}
if {$pass} {
set thing "BYTE\r\n"
send $thing
expect {
-re ".*BYTE\r\n${prompt} $" {
}
timeout {
send_user "Timeout\n"
set pass 0
}
}
}
if {$pass} {
pass $test_name
} else {
fail $test_name
}
das-test_exit
|