1set word l
2set userName Clayton
3set projName SysAdmin
4set password password
5
6set timeout 200000
7
8proc w {} { expect  -re {\nr [0-9]+:[0-9]+ .*\r}; sleep .1}
9proc wi {} { expect  -re {Input.\r}; sleep .1}
10proc wn {} { expect  -re {\n}; sleep .1}
11proc sw { txt } { send $txt; send "\r"; w }
12proc swi { txt } { send $txt; send "\r"; wi }
13proc swn { txt } { send $txt; send "\r"; wn }
14proc wf {} { expect  -re {\nr  [0-9]+\r}; sleep .1}
15proc swf { txt } { send $txt; send "\r"; wf }
16
17
18spawn telnet localhost 9180
19set telnetID $spawn_id
20
21expect -re {HSLA Port \((d\.h\d+)}
22puts " "
23set channel $expect_out(1,string)
24send "$channel\r"
25
26#
27# Test if HFED project works (broken in 12.6d)
28#
29
30expect "Load = "
31send "l Clayton HFED\r"
32expect "Password:"
33send "password\r"
34
35# If it works, we should get the TOLTS prompt
36
37expect -timeout 10  "isolts"
38
39send "quit\r"
40
41swn "logout\r"
42sleep 5
43close $telnetID
44
45exit
46
47