Fix bug in setting up w3 and w4 games
[capablanca.git] / lasker-2.2.3 / tests / test1.exp
1 #!/usr/bin/expect -f
2 # simple test script for lasker
3 # Andrew Tridgell <lasker@tridgell.net>
4
5 if {$argc < 3} {
6     send_user "Usage: test.exp HOSTNAME USERNAME PASSWORD\n"
7     exit
8 }
9
10 set host [lrange $argv 0 0]
11 set user [lrange $argv 1 1]
12 set pass [lrange $argv 2 2]
13
14 set timeout -1
15 match_max 100000
16 spawn tseal $host 5000
17 expect "\rlogin: "
18 send "$user\r"
19 expect "password: "
20 send "$pass\r"
21 expect "fics% "
22
23 send "who\r"
24 expect "$user"
25 expect "players displayed"
26 expect "indicates system administrator."
27 expect "fics% "
28
29 send "who a\r"
30 expect "$user"
31 expect "players displayed"
32 expect "indicates system administrator."
33 expect "fics% "
34
35 send "who z\r"
36 expect "Command:  who"
37 expect "See 'help who' for a complete description"
38 expect "fics% "
39
40 send "zzdf\r"
41 expect "zzdf: Command not found."
42 expect "fics% "
43
44 send "help f\r"
45 expect "'f' is a global alias for 'finger'"
46 expect "fics% "
47
48 send "help c\r"
49 expect -- "-- Matches: "
50 expect "help topics --"
51 expect "clearmessages"
52 expect "fics% "
53
54 send -- "-notify tridge\r"
55 send "+notify tridge\r"
56 expect "added to your notify list."
57 expect "fics% "
58
59 send "+notify tridge\r"
60 expect "is already on your notify list."
61 expect "fics% "
62
63 send "=notify\r"
64 expect -- "-- notify list: 1 names --"
65 expect "fics% "
66
67 send "toggle notify tridge\r"
68 expect "removed from your notify list."
69 expect "fics% "
70
71 send "set style 12\r"
72 send "match $user\r"
73 expect "<12> rnbqkbnr pppppppp -------- -------- -------- -------- PPPPPPPP RNBQKBNR"
74 expect "fics% "
75
76 send "e4\r"
77 expect "<12> rnbqkbnr pppppppp -------- -------- ----P--- -------- PPPP-PPP RNBQKBNR"
78 expect "fics% "
79
80 send "e5\r"
81 expect "<12> rnbqkbnr pppp-ppp -------- ----p--- ----P--- -------- PPPP-PPP RNBQKBNR"
82 expect "fics% "
83
84 send "unexamine\r"
85 expect "You are no longer examining game"
86 expect "fics% "
87
88
89 send -- "quit\r"
90 expect "Thank you for using a"