03.exp 47.2 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
1
# Test suite for lyskomd.
Per Cederqvist's avatar
Per Cederqvist committed
2
# Copyright (C) 1998-2000  Lysator Academic Computer Association.
Per Cederqvist's avatar
Per Cederqvist committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
# This file is part of the LysKOM server.
# 
# LysKOM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by 
# the Free Software Foundation; either version 1, or (at your option) 
# any later version.
# 
# LysKOM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
# 
# You should have received a copy of the GNU General Public License
# along with LysKOM; see the file COPYING.  If not, write to
# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
# MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se. 


25
# Check that all functions do the right thing in their most normal use.
26
27
28
#
# The following objects are created in this test case:
#   Conferences
Per Cederqvist's avatar
Per Cederqvist committed
29
#    7 "(So called) Christian Music", later "PRIMa musik"
Per Cederqvist's avatar
Per Cederqvist committed
30
#    9 "Temporary Sancturay" (immediately deleted)
Per Cederqvist's avatar
Per Cederqvist committed
31
32
#   10 "aux in general" (created at call 88)
#   11 "aux non anon" (created at call 88)
33
34
35
36
37
#   Persons
#    6 "Per Cederqvist"
#         Member of 7.
#    8 "Kelly Talisman" (all available aux-infos are set)
#         Member of 7.
Per Cederqvist's avatar
Per Cederqvist committed
38
#   12 "aux person"
39
40
#   Texts
#    1 "Old-style text 1"    0 7 6 1
Per Cederqvist's avatar
Per Cederqvist committed
41
#    2 "Old-style text 2"    0 7 6 2 (deleted at call 28)
42
#    3 "Old-style text 3"    0 7 6 3 (; 0 2 6 1 during 29..31)
43
44
45
46
#    4 "New-style text 4"    0 7 6 4; 15 6 6 1
#    5 "New-style text 5"    0 7 6 5; 15 6 6 2
#    6 "New-style text 6"    0 7 6 6; 15 8 6 1
#    7 "New-style text 7"    0 1 6 1; 15 8 6 2
Per Cederqvist's avatar
Per Cederqvist committed
47
#    8 "Anon text 8"         0 1 6 2
Per Cederqvist's avatar
Per Cederqvist committed
48
49
#    9 "aux-style text 9"    0 7 6 7
#   10 "aux-style anon 10"   0 7 6 7 (FAQ for conf 10 and 11 after call 88)
50
#   Sessions
Per Cederqvist's avatar
Per Cederqvist committed
51
#    1 logged in as person 6; default asyncs; does not use user_active
52
#      or set_client_version or any other new and fancy stuff.
Per Cederqvist's avatar
Per Cederqvist committed
53
54
#      (This is client 0)
#    2 logged in as person 8; all available asyncs; uses user_active;
55
#      calls set_client_version("dgt03", "sc 1").
Per Cederqvist's avatar
Per Cederqvist committed
56
57
#      (This is client 1)
#    3 logged in as person 8 for brief moments.  Logged in invisibly
Per Cederqvist's avatar
Per Cederqvist committed
58
#      as person 5 from the testing of call 8 and onwards.
Per Cederqvist's avatar
Per Cederqvist committed
59
#      Default asyncs; does not us user_active or set_client_version.
Per Cederqvist's avatar
Per Cederqvist committed
60
61
62
63
#      (This is client 2)
#    4 logged in invisibly as person 5 from call 79.
#      Default asyncs; does not us user_active or set_client_version.
#      (This is client 2)
64
65
read_versions

66
lyskomd_start
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

# Preamble: create a "typical database" containing some persons and
# texts created with traditional calls, and some created using newer
# calls.

# Client 0 is traditional.  Let it start the race.

client_start 0
talk_to client 0
send "A[holl "ceder@gratia"]\n"
simple_expect "LysKOM" "connected"

send "1000 12 [holl "Per Cederqvist"]\n"
simple_expect "=1000 0 \\* \\*"

Per Cederqvist's avatar
Per Cederqvist committed
82
# This test was written while listening to Talitha, so it seemed proper
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# to use her name as password.
send "1001 5 [holl "Per Cederqvist"] [holl "Talitha"]\n"
simple_expect ":2 9 6 1"
simple_expect "=1001 6"

# Create a conference
send "1002 10 [holl "(So called) Christian Music"] 0000\n"
simple_expect "=1002 7"

send "1003 2 7\n"
simple_expect "%1003 13 7"

send "1004 14 7 6 100 1\n"
simple_expect "=1004"

send "1005 2 7\n"
simple_expect "=1005"

send "1006 28 [holl "Old-style text 1"] 1 { 0 7 }\n"
Per Cederqvist's avatar
Per Cederqvist committed
102
extracting_expect ":16 0 1 ($any_time) 6 0 16 0 2 { 0 7 6 1 }" time_1 1
103
104
simple_expect "=1006 1"

Per Cederqvist's avatar
Per Cederqvist committed
105
106
107
108
109
110
111
set post_1 $time_1
while {"$post_1" == "$time_1"} {
    sleep 0.1
    send "999 35\n"
    extracting_expect "=999 ($any_time)" post_1 1
}

112
send "1007 28 [holl "Old-style text 2"] 2 { 0 7 6 99 }\n"
Per Cederqvist's avatar
Per Cederqvist committed
113
extracting_expect ":16 0 2 ($any_time) 6 0 16 0 2 { 0 7 6 2 }" time_2 1
114
115
simple_expect "=1007 2"

Per Cederqvist's avatar
Per Cederqvist committed
116
117
118
119
120
121
122
set post_2 $time_2
while {"$post_2" == "$time_2"} {
    sleep 0.1
    send "999 35\n"
    extracting_expect "=999 ($any_time)" post_2 1
}

123
send "1008 28 [holl "Old-style text 3"] 1 { 0 7 }\n"
Per Cederqvist's avatar
Per Cederqvist committed
124
extracting_expect ":16 0 3 ($any_time) 6 0 16 0 2 { 0 7 6 3 }" time_3 1
125
126
127
128
129
130
131
132
133
134
135
136
simple_expect "=1008 3"

# Client 1 is contemporary.  Let it use all the latest fancy stuff.

client_start 1
talk_to client 1
send "A[holl "ic@gratia"]\n"
simple_expect "LysKOM" "client 1 connected"

send "1009 69 [holl "dgt03"] [holl "sc 1"]\n"
simple_expect "=1009"

137
138
139
# This test is written on the assumption that the server knows about
# exactly these aux-items.  It shouldn't be hard to fix the test suite
# when more items are added.
140
send "1010 96\n"
141
simple_expect "=1010 37 { 10104 10103 10102 10101 10100 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 }"
142
143
144
145

send "1011 82\n"
simple_expect "=1011"

Per Cederqvist's avatar
Per Cederqvist committed
146
147
send "1012 35\n"
extracting_expect "=1012 ($any_time)" user_active_0 1
148

Per Cederqvist's avatar
Per Cederqvist committed
149
150
send "1013 81\n"
simple_expect "=1013 8 { 0 5 7 8 9 11 12 13 }"
151

152
153
154
# The next line is split in two to avoid filling the pty buffer.
send "1014 80 129 { 0 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 81\n"
send       "82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 }\n"
Per Cederqvist's avatar
Per Cederqvist committed
155
simple_expect "%1014 46 0"
156

Per Cederqvist's avatar
Per Cederqvist committed
157
158
send "1015 81\n"
simple_expect "=1015 8 { 0 5 7 8 9 11 12 13 }"
159

160
161
send "1016 80 128 { 0 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 81\n"
send      "82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 129 }\n"
Per Cederqvist's avatar
Per Cederqvist committed
162
simple_expect "%1016 50 1"
163

Per Cederqvist's avatar
Per Cederqvist committed
164
send "1017 81\n"
David Byers's avatar
David Byers committed
165
simple_expect "=1017 14 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 }"
166

167
168
send "1018 80 127 { 0 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 81 82\n"
send     "83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 129 }\n"
Per Cederqvist's avatar
Per Cederqvist committed
169
simple_expect "%1018 50 2"
170

171
172
send "1019 80 126 { 0 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 81 82\n"
send      "83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 129 }\n"
Per Cederqvist's avatar
Per Cederqvist committed
173
simple_expect "%1019 50 3"
174

Per Cederqvist's avatar
Per Cederqvist committed
175
send "1020 81\n"
David Byers's avatar
David Byers committed
176
simple_expect "=1020 14 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 }"
177

178
179
send "1021 80 126 { 0 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 81 82 83\n"
send     "84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 3923 }\n"
Per Cederqvist's avatar
Per Cederqvist committed
180
simple_expect "%1021 50 4"
181

Per Cederqvist's avatar
Per Cederqvist committed
182
send "1022 81\n"
David Byers's avatar
David Byers committed
183
simple_expect "=1022 14 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 }"
184

185
186
send "1023 80 125 { 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60\n"
send     "59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 0 }\n"
Per Cederqvist's avatar
Per Cederqvist committed
187
simple_expect "%1023 50 128"
188

189
190
send "1024 80 124 { 0 5 6 7 8 9 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 81 82 83 84 85\n"
send     "86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 }\n"
David Byers's avatar
David Byers committed
191
simple_expect "%1024 50 19"
192

Per Cederqvist's avatar
Per Cederqvist committed
193
send "1025 81\n"
David Byers's avatar
David Byers committed
194
simple_expect "=1025 14 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 }"
195

Per Cederqvist's avatar
Per Cederqvist committed
196
197
send "1026 80 12 { 0 5 6 7 8 9 10 11 12 13 14 15 }\n"
simple_expect "%1026 50 10"
198

Per Cederqvist's avatar
Per Cederqvist committed
199
200
send "1027 80 11 { 0 5 6 7 8 9 11 12 13 14 15 }\n"
simple_expect "=1027"
201

Per Cederqvist's avatar
Per Cederqvist committed
202
203
204
send "1028 81\n"
simple_expect "=1028 11 { 0 5 6 7 8 9 11 12 13 14 15 }"

205
206
send "1029 89 [holl "Kelly Talisman"] [holl "the stars"] 00000000 9 { 3 00000000 0 [holl "C6 My Creator"] 3 00000000 0 [holl "C7 Slightly offensive name, huh"] 8 00000000 0 [holl "E-mail:kelly@hotbox.com"] 9 00000000 0 [holl "compface must die"] 10 00000000 0\n"
send    "[holl "Air"] 12 00000000 0 [holl "PGP public key"] 13 00000000 0 [holl "kelly@hotbox.com"] 30 00000000 0 [holl "text/plain"] 30 00000000 0 [holl "x-kom/basic"] }\n"
Per Cederqvist's avatar
Per Cederqvist committed
207
simple_expect "=1029 8"
208
send "1030 62 8 [holl "the stars"] 0\n"
209
simple_expect ":2 9 8 2"
210
simple_expect "=1030"
211
212
213
214
talk_to client 0
simple_expect ":2 9 8 2"
talk_to client 1

215
send "1031 86 [holl "New-style text 4"] 2 { 0 7 15 6 } 0 { }\n"
216
217
# No async message; person 8 isn't a member of the conferences this
# text goes to.
218
simple_expect "=1031 4"
219
220
221
222
223
224

talk_to client 0
simple_expect ":16 0 4 $any_time 8 0 16 0 4 { 0 7 6 4 1 6 6 1 }"
talk_to client 1

# Join conference 7.
225
226
send "1032 100 7 8 100 0 00000000\n"
simple_expect "=1032"
227

228
send "1033 86 [holl "New-style text 5"] 2 { 0 7 15 6 } 0 { }\n"
David Byers's avatar
David Byers committed
229
230
simple_expect ":16 0 5 $any_time 8 0 16 0 4 { 0 7 6 5 1 6 6 2 }"
simple_expect ":18 15 5 $any_time 8 0 16 0 4 { 0 7 6 5 15 6 6 2 } 0 \\*"
231
simple_expect "=1033 5"
232

233
234
235
236
talk_to client 0
simple_expect ":16 0 5 $any_time 8 0 16 0 4 { 0 7 6 5 1 6 6 2 }"
talk_to client 1

237
send "1034 86 [holl "New-style text 6"] 2 { 0 7 15 8 } 0 { }\n"
238
239
simple_expect ":16 0 6 $any_time 8 0 16 0 4 { 0 7 6 6 1 8 6 1 }"
simple_expect ":18 15 6 $any_time 8 0 16 0 4 { 0 7 6 6 15 8 6 1 } 0 \\*"
240
simple_expect "=1034 6"
241
242
243
244
245

talk_to client 0
simple_expect ":16 0 6 $any_time 8 0 16 0 2 { 0 7 6 6 }"
talk_to client 1

246
send "1035 86 [holl "New-style text 7"] 2 { 0 1 15 8 } 0 { }\n"
Per Cederqvist's avatar
Per Cederqvist committed
247
248
extracting_expect ":16 0 7 ($any_time) 8 0 16 0 4 { 0 1 6 1 1 8 6 2 }" time_7 1
simple_expect ":18 15 7 $time_7 8 0 16 0 4 { 0 1 6 1 15 8 6 2 } 0 \\*"
249
simple_expect "=1035 7"
250
251
252

talk_to client 0
# No async for client 0 at this point.
253
254
send "1036 35\n"
simple_expect "=1036 $any_time"
255
talk_to client 1
256

Per Cederqvist's avatar
Per Cederqvist committed
257
258
259
260
261
# test call 0 (login)
client_start 2
talk_to client 2
send "A[holl "Foo"]\n"
simple_expect "LysKOM" "client 2 connected"
262
263
264
265
send "1037 0 3 [holl "gazonk"]\n"
simple_expect "%1037 10 3"
send "1038 0 8 [holl "gazonk"]\n"
simple_expect "%1038 4 8"
Per Cederqvist's avatar
Per Cederqvist committed
266
talk_to client 0
Per Cederqvist's avatar
Per Cederqvist committed
267
268
send "1039 35\n"
simple_expect "=1039 $any_time"
269
270
271
talk_to client 1
send "1040 35\n"
simple_expect "=1040 $any_time"
Per Cederqvist's avatar
Per Cederqvist committed
272
talk_to client 2
273
send "1041 0 8 [holl "the stars"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
274
simple_expect ":2 9 8 3"
275
simple_expect "=1041"
Per Cederqvist's avatar
Per Cederqvist committed
276
277
278
279
280
281
282
talk_to client 0
simple_expect ":2 9 8 3"
talk_to client 1
simple_expect ":2 9 8 3"

# test call 1 (logout)
talk_to client 2
283
send "1042 1\n"
Per Cederqvist's avatar
Per Cederqvist committed
284
simple_expect ":2 13 8 3"
285
simple_expect "=1042"
Per Cederqvist's avatar
Per Cederqvist committed
286
287
288
289
290
291
292
talk_to client 0
simple_expect ":2 13 8 3"
talk_to client 1
simple_expect ":2 13 8 3"

# test call 2 (change-conference)
talk_to client 0
293
294
295
296
send "1043 2 2\n"
simple_expect "%1043 13 2"
send "1044 2 34\n"
simple_expect "%1044 9 34"
Per Cederqvist's avatar
Per Cederqvist committed
297
298
# This session has already changed conference to 7 in the preamble above.
# Check that the failed attempts didn't change that.
299
300
send "1045 83 1 0 0\n"
simple_expect "=1045 2 { 2 8 0 $any_num 01000000 0H 1 6 7 $any_num 00000000 0H }"
Per Cederqvist's avatar
Per Cederqvist committed
301
# Check that we can leave all conferences.
302
303
send "1046 2 0\n"
simple_expect "=1046"
Per Cederqvist's avatar
Per Cederqvist committed
304
305
306
talk_to client 1
simple_expect ":5 6 6 0 1 [holl ""] [holl "ceder@gratia@localhost"]"
talk_to client 0
307
308
send "1047 83 1 0 0\n"
simple_expect "=1047 2 { 2 8 0 $any_num 01000000 0H 1 6 0 $any_num 00000000 0H }"
Per Cederqvist's avatar
Per Cederqvist committed
309
# Go to the letterbox and stay there
310
311
send "1048 2 6\n"
simple_expect "=1048"
Per Cederqvist's avatar
Per Cederqvist committed
312
313
314
talk_to client 1
simple_expect ":5 6 6 6 1 [holl ""] [holl "ceder@gratia@localhost"]"
talk_to client 0
315
316
send "1049 83 1 0 0\n"
simple_expect "=1049 2 { 2 8 0 $any_num 01000000 0H 1 6 6 $any_num 00000000 0H }"
Per Cederqvist's avatar
Per Cederqvist committed
317
318
319

# test call 3 (change-name)
talk_to client 0
320
321
322
send "1050 3 7 [holl "Per Cederqvist"]\n"
simple_expect "%1050 20 0"
send "1051 3 7 [holl "PRIMa musik"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
323
simple_expect ":3 5 7 [holl ".So called. Christian Music"] [holl "PRIMa musik"]"
324
simple_expect "=1051"
Per Cederqvist's avatar
Per Cederqvist committed
325
326
327
328
329
330

talk_to client 1
simple_expect ":3 5 7 [holl ".So called. Christian Music"] [holl "PRIMa musik"]"
talk_to client 2
simple_expect ":3 5 7 [holl ".So called. Christian Music"] [holl "PRIMa musik"]"

Per Cederqvist's avatar
Per Cederqvist committed
331
332
# test call 4 (change-what-i-am-doing)
talk_to client 0
333
334
send "1052 4 [holl "Running a test suite"]\n"
simple_expect "=1052"
Per Cederqvist's avatar
Per Cederqvist committed
335
336
talk_to client 1
simple_expect ":5 6 6 6 1 [holl "Running a test suite"] [holl "ceder@gratia@localhost"]"
337
send "1053 4 [holl "Accepting i-am-on"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
338
simple_expect ":5 6 8 0 2 [holl "Accepting i-am-on"] [holl "ic@gratia@localhost"]"
339
simple_expect "=1053"
Per Cederqvist's avatar
Per Cederqvist committed
340
341
342

# call 5 (create-person-old) is tested above.
# test call 6 (get-person-stat-old)
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
send "1054 6 0 0\n"
simple_expect "%1054 8 0"
send "1055 6 3 0\n"
simple_expect "%1055 10 3"
send "1056 6 10 0\n"
simple_expect "%1056 10 10"
send "1057 6 6 0\n"
simple_expect "=1057 [holl ""] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
send "1058 6 6 1\n"
simple_expect "=1058 [holl "ceder@gratia.unknown.@localhost"] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
send "1059 6 6 2\n"
simple_expect "=1059 [holl ""] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
send "1060 6 6 3\n"
simple_expect "=1060 [holl "ceder@gratia.unknown.@localhost"] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
send "1061 6 6 32770\n"
simple_expect "=1061 [holl ""] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
send "1062 6 6 32771\n"
simple_expect "=1062 [holl "ceder@gratia.unknown.@localhost"] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
Per Cederqvist's avatar
Per Cederqvist committed
361
362

# test call 7 (set-priv-bits)
363
364
send "1063 7 8 0000000000000000\n"
simple_expect "%1063 12 0"
Per Cederqvist's avatar
Per Cederqvist committed
365
talk_to client 2
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
send "1064 62 5 [holl "gazonk"] 1\n"
simple_expect "=1064"
send "1065 7 8 0000000000000000\n"
simple_expect "%1065 12 0"
send "1066 42 255\n"
simple_expect "=1066"
send "1067 6 8 0\n"
simple_expect "=1067 [holl ""] 0000010000000000 00000000 $any_time 0 $any_num 2 0 64 0 0 0 0 1 4 0 2"
send "1068 7 8 0000000000000000\n"
simple_expect "=1068"
send "1069 6 8 0\n"
simple_expect "=1069 [holl ""] 0000000000000000 00000000 $any_time 0 $any_num 2 0 64 0 0 0 0 1 4 0 2"
send "1070 7 8 1111111111111111\n"
simple_expect "=1070"
send "1071 6 8 0\n"
simple_expect "=1071 [holl ""] 1111111111111111 00000000 $any_time 0 $any_num 2 0 64 0 0 0 0 1 4 0 2"
send "1072 7 8 0000010000000000\n"
simple_expect "=1072"
send "1073 6 8 0\n"
simple_expect "=1073 [holl ""] 0000010000000000 00000000 $any_time 0 $any_num 2 0 64 0 0 0 0 1 4 0 2"
Per Cederqvist's avatar
Per Cederqvist committed
386
387

# test call 8 (set-passwd)
388
389
390
send "1074 8 5 [holl "foo"] [holl "bar"]\n"
simple_expect "%1074 4 5"
send "1075 8 5 [holl "gazonk"] [holl "bar"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
391
simple_expect "=1075"
392
393
394
395
396
397
send "1076 1\n"
simple_expect "=1076"
send "1077 62 5 [holl "gazonk"] 1\n"
simple_expect "%1077 4 5"
send "1078 62 5 [holl "bar"] 1\n"
simple_expect "=1078"
Per Cederqvist's avatar
Per Cederqvist committed
398
399
400

# test call 9 (query-read-texts-old)
talk_to client 0
401
402
send "1079 9 6 7\n"
simple_expect "=1079 $any_time 7 100 0 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
403
404

# test call 10 (create-conf-old)
405
406
407
408
409
410
send "1080 78 9\n"
simple_expect "%1080 9 9"
send "1081 10 [holl "Temporary Sanctuary"] 1010\n"
simple_expect "=1081 9"
send "1082 78 9\n"
simple_expect "=1082 [holl "Temporary Sanctuary"] 10101000 0 77"
Per Cederqvist's avatar
Per Cederqvist committed
411
412

# test call 11 (delete-conf)
413
414
415
416
send "1083 11 9\n"
simple_expect "=1083"
send "1084 78 9\n"
simple_expect "%1084 9 9"
Per Cederqvist's avatar
Per Cederqvist committed
417
418

# test call 12 (lookup-name)
419
420
421
422
423
424
425
426
427
428
send "1085 12 [holl "p"]\n"
simple_expect "=1085 4 { 1 2 6 7 } { 0000 0000 1001 0000 }"
send "1086 12 [holl "p c"]\n"
simple_expect "=1086 1 { 6 } { 1001 }"
send "1087 12 [holl "xyzzy"]\n"
simple_expect "=1087 0 \\* \\*"
send "1088 12 [holl ""]\n"
simple_expect "=1088 8 { 1 2 3 4 5 6 7 8 } { 0000 0000 0000 0000 1001 1001 0000 1001 }"
send "1089 76 [holl ""] 1 1\n"
simple_expect "=1089 8 { [holl "Presentation .av nya. möten"] 0000 1 [holl "Presentation .av nya. medlemmar"] 0000 2 [holl "Lappar .på. dörren"] 0000 3 [holl "Nyheter om LysKOM"] 0000 4 [holl "Administratör .för. LysKOM"] 1001 5 [holl "Per Cederqvist"] 1001 6 [holl "PRIMa musik"] 0000 7 [holl "Kelly Talisman"] 1001 8 }"
Per Cederqvist's avatar
Per Cederqvist committed
429
430

# test call 13 (get-conf-stat-older)
431
432
433
434
send "1090 13 3 0\n"
simple_expect "=1090 [holl ""] 0000 $any_time $any_time 0 0 0 0 0 0 77 0 1 0"
send "1091 13 3 1\n"
simple_expect "=1091 [holl "Lappar .på. dörren"] 0000 $any_time $any_time 0 0 0 0 0 0 77 0 1 0"
Per Cederqvist's avatar
Per Cederqvist committed
435
436

# test call 14 (add-member-old)
437
438
439
440
send "1092 14 3 6 90 2\n"
simple_expect "=1092"
send "1093 13 3 1\n"
simple_expect "=1093 [holl "Lappar .på. dörren"] 0000 $any_time $any_time 0 0 0 0 0 0 77 1 1 0"
Per Cederqvist's avatar
Per Cederqvist committed
441
442

# test call 15 (sub-member)
443
send "1094 15 3 6\n"
Per Cederqvist's avatar
Per Cederqvist committed
444
simple_expect ":1 8 3"
445
446
447
simple_expect "=1094"
send "1095 15 3 6\n"
simple_expect "%1095 13 3"
Per Cederqvist's avatar
Per Cederqvist committed
448
449

# test call 16 (set-presentation)
450
451
send "1096 16 7 3\n"
simple_expect "=1096"
Per Cederqvist's avatar
Per Cederqvist committed
452
453
454
# We check the result under call 50 below.

# test call 17 (set-etc-motd)
455
456
send "1097 17 7 2\n"
simple_expect "=1097"
Per Cederqvist's avatar
Per Cederqvist committed
457
458
459
# We check the result under call 50 below.

# test call 18 (set-supervisor)
460
461
send "1098 18 7 7\n"
simple_expect "=1098"
Per Cederqvist's avatar
Per Cederqvist committed
462
463
464
# We check the result under call 50 below.

# test call 19 (set-permitted-submitters)
465
466
send "1099 19 7 8\n"
simple_expect "=1099"
Per Cederqvist's avatar
Per Cederqvist committed
467
468
469
# We check the result under call 50 below.

# test call 20 (set-super-conf)
470
471
send "1100 20 7 4\n"
simple_expect "=1100"
Per Cederqvist's avatar
Per Cederqvist committed
472
473
474
# We check the result under call 50 below.

# test call 21 (set-conf-type)
475
476
477
478
send "1101 21 7 0100\n"
simple_expect "=1101"
send "1102 21 7 01001000\n"
simple_expect "=1102"
Per Cederqvist's avatar
Per Cederqvist committed
479
480
481
# We check the result under call 50 below.

# test call 22 (set-garb-nice)
482
483
send "1103 22 7 144\n"
simple_expect "=1103"
Per Cederqvist's avatar
Per Cederqvist committed
484
485
486
# We check the result under call 50 below.

# test call 23 (get-marks) and call 24 (mark-text-old)
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
send "1104 24 2 15\n"
simple_expect "=1104"
send "1105 23\n"
simple_expect "=1105 1 { 2 15 }"
send "1106 24 2 28\n"
simple_expect "=1106"
send "1107 23\n"
simple_expect "=1107 1 { 2 28 }"
send "1108 24 3 9\n"
simple_expect "=1108"
send "1109 23\n"
simple_expect "=1109 2 { 2 28 3 9 }"
send "1110 24 2 0\n"
simple_expect "=1110"
send "1111 23\n"
simple_expect "=1111 1 { 3 9 }"
send "1112 24 3 0\n"
simple_expect "=1112"
send "1113 23\n"
simple_expect "=1113 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
507
508
509

# call 25 is tested extensively in 02.exp

Per Cederqvist's avatar
Per Cederqvist committed
510
511
# This is approximately halfway between the call to user-active and
# the use where we want two seconds to have passed.  Wait for one tick.
512
513
send "1114 35\n"
extracting_expect "=1114 ($any_time)" user_active_1 1
Per Cederqvist's avatar
Per Cederqvist committed
514
515
516
517
518
519
while {"$user_active_1" == "$user_active_0"} {
    sleep 0.1
    send "999 35\n"
    extracting_expect "=999 ($any_time)" user_active_1 1
}

Per Cederqvist's avatar
Per Cederqvist committed
520
# test call 26 (get-text-stat-old)
521
522
send "1115 26 1\n"
simple_expect "=1115 $any_time 6 0 16 0 2 { 0 7 6 1 }"
Per Cederqvist's avatar
Per Cederqvist committed
523

Per Cederqvist's avatar
Per Cederqvist committed
524
# test call 27 (mark-as-read) and 40 (set-unread)
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
send "1116 9 6 7\n"
simple_expect "=1116 $any_time 7 100 0 0 \\*"

send "1117 27 7 1 { 2 }\n"
simple_expect "=1117"
send "1118 9 6 7\n"
simple_expect "=1118 $any_time 7 100 0 1 { 2 }"

send "1119 27 7 1 { 2 }\n"
simple_expect "=1119"
send "1120 46 6 1 1 1\n"
simple_expect "=1120 1 { $any_time 7 100 0 1 { 2 } }"

send "1121 27 7 1 { 4 }\n"
simple_expect "=1121"
send "1122 9 6 7\n"
simple_expect "=1122 $any_time 7 100 0 2 { 2 4 }"

send "1123 27 7 1 { 5 }\n"
simple_expect "=1123"
send "1124 9 6 7\n"
simple_expect "=1124 $any_time 7 100 0 3 { 2 4 5 }"

send "1125 27 7 1 { 6 }\n"
simple_expect "=1125"
send "1126 9 6 7\n"
simple_expect "=1126 $any_time 7 100 0 4 { 2 4 5 6 }"

send "1127 27 7 1 { 1 }\n"
simple_expect "=1127"
send "1128 9 6 7\n"
simple_expect "=1128 $any_time 7 100 2 3 { 4 5 6 }"

send "1129 27 7 1 { 7 }\n"
simple_expect "%1129 16 0"
send "1130 9 6 7\n"
simple_expect "=1130 $any_time 7 100 2 3 { 4 5 6 }"

send "1131 27 7 1 { 3 }\n"
simple_expect "=1131"
send "1132 9 6 7\n"
simple_expect "=1132 $any_time 7 100 6 0 \\*"

send "1133 40 7 6\n"
simple_expect "=1133"
send "1134 9 6 7\n"
simple_expect "=1134 $any_time 7 100 0 0 \\*"

send "1135 27 7 6 { 1 2 3 4 5 6 }\n"
simple_expect "=1135"
send "1136 9 6 7\n"
simple_expect "=1136 $any_time 7 100 6 0 \\*"

send "1137 40 7 6\n"
simple_expect "=1137"
send "1138 9 6 7\n"
simple_expect "=1138 $any_time 7 100 0 0 \\*"

send "1139 27 7 6 { 6 5 4 3 2 1 }\n"
simple_expect "=1139"
send "1140 9 6 7\n"
simple_expect "=1140 $any_time 7 100 6 0 \\*"

send "1141 40 7 6\n"
simple_expect "=1141"
send "1142 9 6 7\n"
simple_expect "=1142 $any_time 7 100 0 0 \\*"

send "1143 27 7 6 { 1 3 5 2 4 6 }\n"
simple_expect "=1143"
send "1144 9 6 7\n"
simple_expect "=1144 $any_time 7 100 6 0 \\*"

send "1145 40 7 6\n"
simple_expect "=1145"
send "1146 9 6 7\n"
simple_expect "=1146 $any_time 7 100 0 0 \\*"

send "1147 27 7 6 { 2 4 6 1 3 5 }\n"
simple_expect "=1147"
send "1148 9 6 7\n"
simple_expect "=1148 $any_time 7 100 6 0 \\*"

send "1149 40 7 6\n"
simple_expect "=1149"
send "1150 9 6 7\n"
simple_expect "=1150 $any_time 7 100 0 0 \\*"

send "1151 27 7 1 { 1 }\n"
simple_expect "=1151"
send "1152 9 6 7\n"
simple_expect "=1152 $any_time 7 100 1 0 \\*"

send "1153 27 7 1 { 1 }\n"
simple_expect "=1153"
send "1154 9 6 7\n"
simple_expect "=1154 $any_time 7 100 1 0 \\*"

send "1155 27 7 1 { 2 }\n"
simple_expect "=1155"
send "1156 9 6 7\n"
simple_expect "=1156 $any_time 7 100 2 0 \\*"

send "1157 27 7 1 { 3 }\n"
simple_expect "=1157"
send "1158 9 6 7\n"
simple_expect "=1158 $any_time 7 100 3 0 \\*"

send "1159 27 7 1 { 4 }\n"
simple_expect "=1159"
send "1160 9 6 7\n"
simple_expect "=1160 $any_time 7 100 4 0 \\*"

send "1161 27 7 1 { 5 }\n"
simple_expect "=1161"
send "1162 9 6 7\n"
simple_expect "=1162 $any_time 7 100 5 0 \\*"

send "1163 27 7 1 { 6 }\n"
simple_expect "=1163"
send "1164 9 6 7\n"
simple_expect "=1164 $any_time 7 100 6 0 \\*"

send "1165 40 7 5\n"
simple_expect "=1165"
send "1166 9 6 7\n"
simple_expect "=1166 $any_time 7 100 1 0 \\*"

send "1167 40 7 2\n"
simple_expect "=1167"
send "1168 9 6 7\n"
simple_expect "=1168 $any_time 7 100 4 0 \\*"

send "1169 40 7 1\n"
simple_expect "=1169"
send "1170 9 6 7\n"
simple_expect "=1170 $any_time 7 100 5 0 \\*"

send "1171 40 7 0\n"
simple_expect "=1171"
send "1172 9 6 7\n"
simple_expect "=1172 $any_time 7 100 6 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
667
668
669
670

# call 28 is tested above

# test call 29 (delete-text)
Per Cederqvist's avatar
Per Cederqvist committed
671
672
# (First, check that get_last_text gives a proper result before the
# text is deleted.)
673
674
675
676
677
send "1173 58 $time_3\n"
simple_expect "=1173 2"
send "1174 98 6 7\n"
simple_expect "=1174 1 $any_time 7 100 6 0 \\* 6 $any_time 00000000"
send "1175 29 2\n"
Per Cederqvist's avatar
Per Cederqvist committed
678
# No new'n'fancy async message here.
679
simple_expect "=1175"
Per Cederqvist's avatar
Per Cederqvist committed
680
681

talk_to client 1
Per Cederqvist's avatar
Per Cederqvist committed
682
# The text is marked since it is motd of conference 7.
Per Cederqvist's avatar
Per Cederqvist committed
683
684
685
simple_expect ":18 14 2 $any_time 6 0 16 1 2 { 0 7 6 2 } 0 \\*"
talk_to client 0

Per Cederqvist's avatar
Per Cederqvist committed
686
687
# Test that mark-as-read of local text number 1 steps past local text
# 2 when it doesn't exist.
688
689
690
691
send "1176 40 7 6\n"
simple_expect "=1176"
send "1177 9 6 7\n"
simple_expect "=1177 $any_time 7 100 0 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
692

693
694
695
696
send "1178 27 7 1 { 1 }\n"
simple_expect "=1178"
send "1179 9 6 7\n"
simple_expect "=1179 $any_time 7 100 2 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
697
698

# test call 30 (add-recipient)
699
700
701
send "1180 30 3 2 0\n"
simple_expect "=1180"
send "1181 26 3\n"
Per Cederqvist's avatar
Per Cederqvist committed
702
# This is marked since text 3 is presentation of conf 7.
703
simple_expect "=1181 $any_time 6 0 16 1 5 { 0 7 6 3 0 2 6 1 9 $any_time }"
Per Cederqvist's avatar
Per Cederqvist committed
704
705

# test call 31 (sub-recipient)
706
707
708
send "1182 31 3 2\n"
simple_expect "=1182"
send "1183 26 3\n"
Per Cederqvist's avatar
Per Cederqvist committed
709
# This is marked since text 3 is presentation of conf 7.
710
simple_expect "=1183 $any_time 6 0 16 1 2 { 0 7 6 3 }"
Per Cederqvist's avatar
Per Cederqvist committed
711
712

# test call 32 (add-comment)
713
send "1184 32 3 1\n"
Per Cederqvist's avatar
Per Cederqvist committed
714
715
716
simple_expect "=1184"
send "1185 26 3\n"
# This is marked since text 3 is presentation of conf 7.
717
simple_expect "=1185 $any_time 6 0 16 1 4 { 0 7 6 3 2 1 9 $any_time }"
Per Cederqvist's avatar
Per Cederqvist committed
718
send "1186 26 1\n"
719
720
721
722
723
724
725
726
727
728
simple_expect "=1186 $any_time 6 0 16 0 3 { 0 7 6 1 3 3 }"

# test call 33 (sub-comment)
send "1187 33 3 1\n"
simple_expect "=1187"
send "1188 26 3\n"
# This is marked since text 3 is presentation of conf 7.
simple_expect "=1188 $any_time 6 0 16 1 2 { 0 7 6 3 }"
send "1189 26 1\n"
simple_expect "=1189 $any_time 6 0 16 0 2 { 0 7 6 1 }"
Per Cederqvist's avatar
Per Cederqvist committed
729
730

# test call 34 (get-map)
731
732
send "1190 34 7 1 50\n"
simple_expect "=1190 1 6 { 1 0 3 4 5 6 }"
Per Cederqvist's avatar
Per Cederqvist committed
733
734

# test call 35 (get-time)
735
736
send "1191 35\n"
simple_expect "=1191 $any_time"
Per Cederqvist's avatar
Per Cederqvist committed
737
738

# test call 36 (get-info-old)
739
740
send "1192 36\n"
simple_expect "=1192 $server_compat_version 1 2 3 4 0"
Per Cederqvist's avatar
Per Cederqvist committed
741
742

# test call 37 (add-footnote)
743
send "1193 37 3 1\n"
Per Cederqvist's avatar
Per Cederqvist committed
744
745
746
simple_expect "=1193"
send "1194 26 3\n"
# This is marked since text 3 is presentation of conf 7.
747
simple_expect "=1194 $any_time 6 0 16 1 4 { 0 7 6 3 4 1 9 $any_time }"
Per Cederqvist's avatar
Per Cederqvist committed
748
send "1195 26 1\n"
749
750
751
752
753
754
755
756
757
758
simple_expect "=1195 $any_time 6 0 16 0 3 { 0 7 6 1 5 3 }"

# test call 38 (sub-footnote)
send "1196 38 3 1\n"
simple_expect "=1196"
send "1197 26 3\n"
# This is marked since text 3 is presentation of conf 7.
simple_expect "=1197 $any_time 6 0 16 1 2 { 0 7 6 3 }"
send "1198 26 1\n"
simple_expect "=1198 $any_time 6 0 16 0 2 { 0 7 6 1 }"
Per Cederqvist's avatar
Per Cederqvist committed
759
760

# test call 39 (who-is-on-old)
761
762
send "1199 39\n"
simple_expect "=1199 2 { 8 0 [holl "Accepting i-am-on"] 6 6 [holl "Running a test suite"] }"
Per Cederqvist's avatar
Per Cederqvist committed
763
764
765
766
767

# call 40 (set-unread) is tested above

# test call 41 (set-motd-of-lyskom)
talk_to client 2
768
769
770
771
772
773
send "1200 42 255\n"
simple_expect "=1200"
send "1201 41 7\n"
simple_expect "=1201"
send "1202 42 0\n"
simple_expect "=1202"
Per Cederqvist's avatar
Per Cederqvist committed
774

775
776
send "1203 36\n"
simple_expect "=1203 $server_compat_version 1 2 3 4 7"
Per Cederqvist's avatar
Per Cederqvist committed
777
778
779
780

# call 42 (enable) is tested above

# test call 43 (sync-kom)
781
782
783
784
785
send "1204 43\n"
simple_expect "%1204 12 0"
send "1205 42 255\n"
simple_expect "=1205"
send "1206 43\n"
Per Cederqvist's avatar
Per Cederqvist committed
786
787
simple_expect ":0 7"
simple_expect ":0 7"
788
simple_expect "=1206"
Per Cederqvist's avatar
Per Cederqvist committed
789
790
791
792
793
794
795
talk_to client 0
simple_expect ":0 7"
simple_expect ":0 7"
talk_to client 1
simple_expect ":0 7"
simple_expect ":0 7"
talk_to client 2
796
797
send "1207 42 0\n"
simple_expect "=1207"
Per Cederqvist's avatar
Per Cederqvist committed
798
799
800
801

# test call 44 (shutdown-kom) is tested below

# test call 45 (broadcast)
802
send "1208 45 [holl "a broadcast message"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
803
simple_expect ":3 12 0 5 [holl "a broadcast message"]"
804
simple_expect "=1208"
Per Cederqvist's avatar
Per Cederqvist committed
805
806
807
808
809
talk_to client 1
simple_expect ":3 12 0 5 [holl "a broadcast message"]"
talk_to client 0
simple_expect ":3 12 0 5 [holl "a broadcast message"]"

Per Cederqvist's avatar
Per Cederqvist committed
810
# test call 46 (get-membership-old)
811
812
send "1209 46 6 0 100 1\n"
simple_expect "=1209 2 { $any_time 6 255 0 0 \\* $any_time 7 100 2 0 \\* }"
Per Cederqvist's avatar
Per Cederqvist committed
813
814

# test call 47 (get-created-texts)
815
816
send "1210 47 6 1 100\n"
simple_expect "=1210 1 3 { 1 0 3 }"
Per Cederqvist's avatar
Per Cederqvist committed
817
818

# test call 48 (get-members-old)
819
820
send "1211 48 7 0 100\n"
simple_expect "=1211 2 { 6 8 }"
Per Cederqvist's avatar
Per Cederqvist committed
821
822

# test call 49 (get-person-stat)
823
824
send "1212 49 6\n"
simple_expect "=1212 [holl "ceder@gratia.unknown.@localhost"] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 2 1 3 0 2"
Per Cederqvist's avatar
Per Cederqvist committed
825

Per Cederqvist's avatar
Per Cederqvist committed
826
# test call 50 (get-conf-stat-old)
827
828
send "1213 50 7\n"
simple_expect "=1213 [holl "PRIMa musik"] 0100 $any_time $any_time 6 3 7 8 4 2 144 2 1 6"
Per Cederqvist's avatar
Per Cederqvist committed
829
# test call 51 (who-is-on)
830
831
send "1214 51\n"
simple_expect "=1214 2 { 8 0 2 [holl "Accepting i-am-on"] [holl "ic@gratia@localhost"] 6 6 1 [holl "Running a test suite"] [holl "ceder@gratia@localhost"] }"
Per Cederqvist's avatar
Per Cederqvist committed
832
833

# test call 52 (get-unread-confs)
834
835
send "1215 52 6\n"
simple_expect "=1215 2 { 6 7 }"
Per Cederqvist's avatar
Per Cederqvist committed
836
837

# test call 53 (send-message)
838
839
send "1216 53 8 [holl "hullo eight"]\n"
simple_expect "=1216"
Per Cederqvist's avatar
Per Cederqvist committed
840
841
842
talk_to client 1
simple_expect ":3 12 8 6 [holl "hullo eight"]"
talk_to client 0
843
send "1217 53 7 [holl "seven"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
844
simple_expect ":3 12 7 6 [holl "seven"]"
845
simple_expect "=1217"
Per Cederqvist's avatar
Per Cederqvist committed
846
847
848
talk_to client 1
simple_expect ":3 12 7 6 [holl "seven"]"
talk_to client 0
849
send "1218 53 0 [holl "all"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
850
simple_expect ":3 12 0 6 [holl "all"]"
851
simple_expect "=1218"
Per Cederqvist's avatar
Per Cederqvist committed
852
853
854
855
856
857
858
talk_to client 1
simple_expect ":3 12 0 6 [holl "all"]"
talk_to client 2
simple_expect ":3 12 0 6 [holl "all"]"
talk_to client 0

# test call 54 (get-session-info)
859
860
send "1219 54 2\n"
simple_expect "=1219 8 0 2 [holl "Accepting i-am-on"] [holl "ic@gratia@localhost"] $any_num $any_time"
Per Cederqvist's avatar
Per Cederqvist committed
861
862
863

# test call 55 (disconnect)
talk_to client 2
864
865
send "1220 55 3\n"
simple_expect "=1220"
Per Cederqvist's avatar
Per Cederqvist committed
866
867
868
869
client_death 2

# test call 56 (who-am-i)
talk_to client 0
870
871
send "1221 56\n"
simple_expect "=1221 1"
Per Cederqvist's avatar
Per Cederqvist committed
872
873

# test call 57 (set-user-area)
874
875
876
877
send "1222 57 6 3\n"
simple_expect "=1222"
send "1223 49 6\n"
simple_expect "=1223 [holl "ceder@gratia.unknown.@localhost"] 0000010000000000 00000000 $any_time 3 0 1 0 48 0 0 0 2 1 3 0 2"
Per Cederqvist's avatar
Per Cederqvist committed
878
879

# test call 58 (get-last-text)
880
881
send "1224 58 0 0 0 1 0 98 0 0 0\n"
simple_expect "=1224 0"
Per Cederqvist's avatar
Per Cederqvist committed
882

883
884
send "1225 35\n"
extracting_expect "=1225 ($any_time)" post_7 1
Per Cederqvist's avatar
Per Cederqvist committed
885
886
887
888
889
890
while {"$post_7" == "$time_7"} {
    sleep 0.1
    send "999 35\n"
    extracting_expect "=999 ($any_time)" post_7 1
}

891
892
893
894
895
896
897
898
send "1226 58 $time_1\n"
simple_expect "=1226 0"
send "1227 58 $time_2\n"
simple_expect "=1227 1"
send "1228 58 $time_3\n"
simple_expect "=1228 1"
send "1229 58 $post_7\n"
simple_expect "=1229 7"
Per Cederqvist's avatar
Per Cederqvist committed
899
900

# test call 59 (create-anonymous-text-old)
901
902
send "1230 59 [holl "Anon text 8"] 1 { 0 2 }\n"
simple_expect "=1230 8"
Per Cederqvist's avatar
Per Cederqvist committed
903
# check that the number of created texts/bytes does not increase
904
905
send "1231 49 6\n"
simple_expect "=1231 [holl "ceder@gratia.unknown.@localhost"] 0000010000000000 00000000 $any_time 3 0 1 0 48 0 0 0 2 1 3 0 2"
Per Cederqvist's avatar
Per Cederqvist committed
906
907

# test call 60 (find-next-text-no)
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
send "1232 60 0\n"
simple_expect "=1232 1"
send "1233 60 1\n"
simple_expect "=1233 3"
send "1234 60 2\n"
simple_expect "=1234 3"
send "1235 60 3\n"
simple_expect "=1235 4"
send "1236 60 4\n"
simple_expect "=1236 5"
send "1237 60 5\n"
simple_expect "=1237 6"
send "1238 60 6\n"
simple_expect "=1238 7"
send "1239 60 7\n"
simple_expect "=1239 8"
send "1240 60 8\n"
simple_expect "%1240 14 8"
Per Cederqvist's avatar
Per Cederqvist committed
926
927

# test call 61 (find-previous-text-no)
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
send "1241 61 0\n"
simple_expect "%1241 14 0"
send "1242 61 1\n"
simple_expect "%1242 14 1"
send "1243 61 2\n"
simple_expect "=1243 1"
send "1244 61 3\n"
simple_expect "=1244 1"
send "1245 61 4\n"
simple_expect "=1245 3"
send "1246 61 5\n"
simple_expect "=1246 4"
send "1247 61 6\n"
simple_expect "=1247 5"
send "1248 61 7\n"
simple_expect "=1248 6"
send "1249 61 8\n"
simple_expect "=1249 7"
send "1250 61 9\n"
simple_expect "=1250 8"
send "1251 61 10\n"
simple_expect "=1251 8"
send "1252 61 1000\n"
simple_expect "=1252 8"
Per Cederqvist's avatar
Per Cederqvist committed
952
953
954
955

# call 62 is tested above

# test call 63 (who-is-on-ident)
956
957
send "1253 63\n"
simple_expect "=1253 2 { 8 0 2 [holl "Accepting i-am-on"] [holl "ic@gratia"] [holl "localhost"] [holl "unknown"] 6 6 1 [holl "Running a test suite"] [holl "ceder@gratia"] [holl "localhost"] [holl "unknown"] }"
Per Cederqvist's avatar
Per Cederqvist committed
958
959

# test call 64 (get-session-info-ident)
960
961
send "1254 64 2\n"
simple_expect "=1254 8 0 2 [holl "Accepting i-am-on"] [holl "ic@gratia"] [holl "localhost"] [holl "unknown"] $any_num $any_time"
Per Cederqvist's avatar
Per Cederqvist committed
962
963

# test call 65 (re-lookup-person)
964
965
966
967
send "1255 65 [holl "nya"]\n"
simple_expect "=1255 0 \\*"
send "1256 65 [holl "el*y"]\n"
simple_expect "=1256 1 { 8 }"
Per Cederqvist's avatar
Per Cederqvist committed
968
969

# test call 66 (re-lookup-conf)
970
971
send "1257 66 [holl "nya"]\n"
simple_expect "=1257 2 { 1 2 }"
Per Cederqvist's avatar
Per Cederqvist committed
972
973

# test call 67 (lookup-person)
974
975
send "1258 67 [holl "k t"]\n"
simple_expect "=1258 1 { 8 }"
Per Cederqvist's avatar
Per Cederqvist committed
976
977

# test call 68 (lookup-conf)
978
979
send "1259 68 [holl "p m"]\n"
simple_expect "=1259 3 { 1 2 7 }"
Per Cederqvist's avatar
Per Cederqvist committed
980
981
982

# test call 69 (set-client-version)
talk_to client 1
983
984
send "1260 69 [holl "i changed my mind"] [holl "99.9"]\n"
simple_expect "%1260 41 0"
Per Cederqvist's avatar
Per Cederqvist committed
985
986
987
talk_to client 0

# test call 70 (get-client-name)
988
989
send "1261 70 2\n"
simple_expect "=1261 [holl "dgt03"]"
Per Cederqvist's avatar
Per Cederqvist committed
990
991

# test call 71 (get-client-version)
992
993
send "1262 71 2\n"
simple_expect "=1262 [holl "sc 1"]"
Per Cederqvist's avatar
Per Cederqvist committed
994
995

# test call 72 (mark-text)
996
send "1263 72 1 92\n"
Per Cederqvist's avatar
Per Cederqvist committed
997
simple_expect "=1263"
998
999
1000
send "1264 72 3 0\n"
simple_expect "=1264"
send "1265 72 4 91\n"
Per Cederqvist's avatar
Per Cederqvist committed
1001
simple_expect "=1265"
1002
send "1266 72 4 98\n"
Per Cederqvist's avatar
Per Cederqvist committed
1003
1004
simple_expect "=1266"
send "1267 23\n"
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
simple_expect "=1267 3 { 1 92 3 0 4 98 }"

# test call 73 (unmark-text)
send "1268 73 4\n"
simple_expect "=1268"
send "1269 73 1\n"
simple_expect "=1269"
send "1270 23\n"
simple_expect "=1270 1 { 3 0 }"
send "1271 73 1\n"
simple_expect "%1271 44 1"
send "1272 23\n"
simple_expect "=1272 1 { 3 0 }"
send "1273 73 3\n"
simple_expect "=1273"
send "1274 23\n"
simple_expect "=1274 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1022
1023

# test call 74 (re-z-lookup)
1024
1025
1026
1027
1028
1029
send "1275 74 [holl "P.*r"] 1 1\n"
simple_expect "=1275 3 { [holl "Presentation .av nya. möten"] 0000 1 [holl "Presentation .av nya. medlemmar"] 0000 2 [holl "Per Cederqvist"] 1001 6 }"
send "1276 74 [holl "P.*r"] 0 1\n"
simple_expect "=1276 2 { [holl "Presentation .av nya. möten"] 0000 1 [holl "Presentation .av nya. medlemmar"] 0000 2 }"
send "1277 74 [holl "P.*r"] 1 0\n"
simple_expect "=1277 1 { [holl "Per Cederqvist"] 1001 6 }"
Per Cederqvist's avatar
Per Cederqvist committed
1030
# This is a meaningless combination, so test it.
1031
1032
send "1278 74 [holl "P.*r"] 0 0\n"
simple_expect "=1278 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1033
1034

# test call 75 (get-version-info)
1035
1036
send "1279 75\n"
simple_expect "=1279 $protocol_a_level [holl "$server_software"] [holl "$server_version"]"
Per Cederqvist's avatar
Per Cederqvist committed
1037
1038

# test call 76 (lookup-z-name)
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
send "1280 76 [holl "P r"] 1 1\n"
simple_expect "=1280 0 \\*"
send "1281 76 [holl "P"] 1 1\n"
simple_expect "=1281 4 { [holl "Presentation .av nya. möten"] 0000 1 [holl "Presentation .av nya. medlemmar"] 0000 2 [holl "Per Cederqvist"] 1001 6 [holl "PRIMa musik"] 0100 7 }"
send "1282 76 [holl "P"] 0 1\n"
simple_expect "=1282 3 { [holl "Presentation .av nya. möten"] 0000 1 [holl "Presentation .av nya. medlemmar"] 0000 2 [holl "PRIMa musik"] 0100 7 }"
send "1283 76 [holl "P"] 1 0\n"
simple_expect "=1283 1 { [holl "Per Cederqvist"] 1001 6 }"
send "1284 76 [holl "P"] 0 0\n"
simple_expect "=1284 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1049
1050

# test call 77 (set-last-read)
1051
1052
1053
1054
1055
1056
1057
1058
send "1285 77 7 0\n"
simple_expect "=1285"
send "1286 9 6 7\n"
simple_expect "=1286 $any_time 7 100 0 0 \\*"

send "1287 77 7 1\n"
simple_expect "=1287"
send "1288 9 6 7\n"
Per Cederqvist's avatar
Per Cederqvist committed
1059
1060
# It would be proper for the implementation to return "2 0 \\*"
# instead of "1 0 \\*" since text 2 no longer exists.
1061
simple_expect "=1288 $any_time 7 100 1 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1062
1063

# Local text number 2 no longer exists
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
send "1289 77 7 2\n"
simple_expect "=1289"
send "1290 9 6 7\n"
simple_expect "=1290 $any_time 7 100 2 0 \\*"

send "1291 77 7 4\n"
simple_expect "=1291"
send "1292 9 6 7\n"
simple_expect "=1292 $any_time 7 100 4 0 \\*"

send "1293 77 7 5\n"
simple_expect "=1293"
send "1294 9 6 7\n"
simple_expect "=1294 $any_time 7 100 5 0 \\*"

send "1295 77 7 6\n"
simple_expect "=1295"
send "1296 9 6 7\n"
simple_expect "=1296 $any_time 7 100 6 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1083
1084
1085

# Check what happens when we try to set last-text-read to a local text
# number that doesn't yet exist.
1086
1087
1088
1089
send "1297 77 7 7\n"
simple_expect "=1297"
send "1298 9 6 7\n"
simple_expect "=1298 $any_time 7 100 6 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1090

Per Cederqvist's avatar
Per Cederqvist committed
1091
# test call 78 (get-uconf-stat)
1092
1093
send "1299 78 7\n"
simple_expect "=1299 [holl "PRIMa musik"] 01001000 6 144"
Per Cederqvist's avatar
Per Cederqvist committed
1094
1095
1096
1097
1098

# test call 79 (set-info)
client_start 2
send "A3Hfoo\n"
simple_expect "LysKOM"
1099
1100
1101
1102
1103
send "1300 62 5 [holl "bar"] 1\n"
simple_expect "=1300"
send "1301 42 255\n"
simple_expect "=1301"
send "1302 79 32 7 1 2 8 3\n"
Per Cederqvist's avatar
Per Cederqvist committed
1104
1105
simple_expect "=1302"
send "1303 94\n"
1106
simple_expect "=1303 $server_compat_version 7 1 2 8 3 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1107
send "1304 36\n"
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
simple_expect "=1304 $server_compat_version 7 1 2 8 3"
send "1305 79 $server_compat_version 1 2 3 4 0\n"
simple_expect "=1305"
send "1306 94\n"
simple_expect "=1306 $server_compat_version 1 2 3 4 0 0 \\*"
send "1307 36\n"
simple_expect "=1307 $server_compat_version 1 2 3 4 0"
send "1308 79 $server_compat_version 4 3 2 1 2\n"
simple_expect "%1308 14 2"
send "1309 36\n"
simple_expect "=1309 $server_compat_version 1 2 3 4 0"
send "1310 79 $server_compat_version 1 2 3 9 0\n"
simple_expect "%1310 9 9"
send "1311 36\n"
simple_expect "=1311 $server_compat_version 1 2 3 4 0"
Per Cederqvist's avatar
Per Cederqvist committed
1123
talk_to client 1
Per Cederqvist's avatar
Per Cederqvist committed
1124

1125
1126
# call 80 is tested during startup of client 1.
# call 81 is tested during startup of client 1.
Per Cederqvist's avatar
Per Cederqvist committed
1127
1128
1129

# test call 82 (user-active) and call 83 (who-is-on-dynamic)
# Wait for the second tick.
1130
1131
send "1312 35\n"
extracting_expect "=1312 ($any_time)" user_active_2 1
Per Cederqvist's avatar
Per Cederqvist committed
1132
1133
1134
1135
1136
while {"$user_active_2" == "$user_active_1"} {
    sleep 0.1
    send "999 35\n"
    extracting_expect "=999 ($any_time)" user_active_2 1
}
David Byers's avatar
David Byers committed
1137
1138
1139

sleep 2

1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
send "1313 83 1 1 0\n"
simple_expect "=1313 3 { 4 5 0 $any_num 10000000 [holl ""] 2 8 0 $any_num 01000000 [holl "Accepting i-am-on"] 1 6 6 $any_num 00000000 [holl "Running a test suite"] }"
send "1314 83 1 1 2\n"
simple_expect "=1314 2 { 4 5 0 $any_num 10000000 [holl ""] 1 6 6 $any_num 00000000 [holl "Running a test suite"] }"
send "1315 83 1 0 2\n"
simple_expect "=1315 1 { 1 6 6 $any_num 00000000 [holl "Running a test suite"] }"
send "1316 83 0 1 2\n"
simple_expect "=1316 1 { 4 5 0 $any_num 10000000 [holl ""] }"
send "1317 83 0 0 2\n"
simple_expect "=1317 0 \\*"
send "1318 83 0 0 0\n"
simple_expect "=1318 0 \\*"

send "1319 82\n"
simple_expect "=1319"
send "1320 83 1 1 2\n"
simple_expect "=1320 3 { 4 5 0 $any_num 10000000 [holl ""] 2 8 0 $any_num 01000000 [holl "Accepting i-am-on"] 1 6 6 $any_num 00000000 [holl "Running a test suite"] }"

send "1321 83 1 1 2\n"
simple_expect "=1321 3 { 4 5 0 $any_num 10000000 [holl ""] 2 8 0 $any_num 01000000 [holl "Accepting i-am-on"] 1 6 6 $any_num 00000000 [holl "Running a test suite"] }"
Per Cederqvist's avatar
Per Cederqvist committed
1160

1161
# This test is timing sensitive.  It will fail if the server is extremely slow.
1162
1163
send "1322 83 1 0 2\n"
simple_expect "=1322 2 { 2 8 0 $any_num 01000000 [holl "Accepting i-am-on"] 1 6 6 $any_num 00000000 [holl "Running a test suite"] }"
Per Cederqvist's avatar
Per Cederqvist committed
1164
1165

# test call 84 (get-static-session-info)
1166
1167
send "1323 84 2\n"
simple_expect "=1323 [holl "ic@gratia"] [holl "localhost"] [holl "unknown"] $any_time"
Per Cederqvist's avatar
Per Cederqvist committed
1168
1169

# test call 85 (get-collate-table)
1170
1171
send "1324 85\n"
unanchored_expect "^MRK:client1: =1324 256H" "collate-table start"
1172
unanchored_expect "$nl" "get-collate-table newline before digits"
1173
# unanchored_expect "0123456789" "collate digits"
Per Cederqvist's avatar
Per Cederqvist committed
1174
unanchored_expect "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "collate upper"
1175
# unanchored_expect "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "collate lower"
Per Cederqvist's avatar
Per Cederqvist committed
1176
1177
unanchored_expect "\377$nl" "collate end"

Per Cederqvist's avatar
Per Cederqvist committed
1178
# test call 86 (create-text)
1179
send "1325 86 [holl "aux-style text 9"] 2 { 0 7 6 7 } 1 { 1 11111111 7 [holl "text/plain"] }\n"
Per Cederqvist's avatar
Per Cederqvist committed
1180
1181
1182
1183
extracting_expect ":16 0 9 ($any_time) 8 0 16 0 2 { 0 7 6 7 }" time_9 1
# The last three bits in aux-flags had no defined meaning when this
# test was written.
simple_expect ":18 15 9 $time_9 8 0 16 0 2 { 0 7 6 7 } 1 { 1 1 8 $time_9 00000111 1 [holl "text/plain"] }"
1184
simple_expect "=1325 9"
Per Cederqvist's avatar
Per Cederqvist committed
1185
1186
1187
1188
1189
1190

talk_to client 0
simple_expect ":16 0 9 $time_9 8 0 16 0 2 { 0 7 6 7 }"
talk_to client 1

# test call 87 (create-anonymous-text)
1191
send "1326 87 [holl "aux-style anon 10"] 2 { 0 7 6 7 } 1 { 1 11111111 7 [holl "text/plain"] }\n"
Per Cederqvist's avatar
Per Cederqvist committed
1192
1193
1194
1195
extracting_expect ":16 0 10 ($any_time) 0 0 17 0 2 { 0 7 6 8 }" time_10 1
# The last three bits in aux-flags had no defined meaning when this
# test was written.
simple_expect ":18 15 10 $time_10 0 0 17 0 2 { 0 7 6 8 } 1 { 1 1 0 $time_10 00000111 1 [holl "text/plain"] }"
1196
simple_expect "=1326 10"
Per Cederqvist's avatar
Per Cederqvist committed
1197
1198
1199
1200
1201
1202

talk_to client 0
simple_expect ":16 0 10 $time_10 0 0 17 0 2 { 0 7 6 8 }"
talk_to client 1

# test call 88 (create-conf)
1203
1204
1205
1206
send "1327 88 [holl "aux in general"] 0100 1 { 14 00000000 1 [holl "10"] }\n"
simple_expect "=1327 10"
send "1328 88 [holl "aux non anon"] 01000000 1 { 14 00000000 1 [holl "10"] }\n"
simple_expect "=1328 11"
Per Cederqvist's avatar
Per Cederqvist committed
1207
1208

# test call 89 (create-person)
1209
1210
send "1329 89 [holl "aux person"] [holl "secret"] 00000000 1 { 12 00000000 1 [holl "public"] }\n"
simple_expect "=1329 12"
Per Cederqvist's avatar
Per Cederqvist committed
1211
1212

# test call 90 (get-text-stat)
1213
send "1330 90 10\n"
David Byers's avatar
David Byers committed
1214
# Text 10 should have two extra aux-items since it is the FAQ of conferences 10 and 11.
1215
simple_expect "=1330 $time_10 0 0 17 0 2 { 0 7 6 8 } 3 { 1 1 0 $time_10 00000111 1 [holl "text/plain"] 2 28 8 $any_time 00001000 0 2H10 3 28 8 $any_time 00001000 0 2H11 }"
Per Cederqvist's avatar
Per Cederqvist committed
1216

David Byers's avatar
David Byers committed
1217
1218
1219
1220
1221
1222
# setup_xfail "*"
# if {$n_marks == 2} {
#     pass "correct number of marks on text 10"
# } else {
#     fail "correct number of marks on text 10"
# }
Per Cederqvist's avatar
Per Cederqvist committed
1223

Per Cederqvist's avatar
Per Cederqvist committed
1224
# test call 91 (get-conf-stat)
1225
1226
1227
1228
send "1331 91 10\n"
extracting_expect "=1331 [holl "aux in general"] 01001000 ($any_time) $any_time 8 0 8 0 8 0 77 77 0 1 0 0 1 { 1 14 8 $any_time 00000000 1 [holl "10"] }" time_c_10 1
send "1332 91 10\n"
simple_expect "=1332 [holl "aux in general"] 01001000 $time_c_10 $time_c_10 8 0 8 0 8 0 77 77 0 1 0 0 1 { 1 14 8 $time_c_10 00000000 1 [holl "10"] }"
1229
1230
1231
1232

# test call 92 (modify-text-info)

# Add a short notice.
1233
1234
1235
send "1333 92 3 0 { } 1 { 2 00000000 1 [holl "Du har fel"] }\n"
simple_expect "=1333"
send "1334 90 3\n"
1236
# This text is marked twice: user area of person 6, presentation for 7.
1237
simple_expect "=1334 $time_3 6 0 16 2 2 { 0 7 6 3 } 1 { 1 2 8 $any_time 00000000 1 [holl "Du har fel"] }"
1238
1239

# Remove it.
1240
1241
1242
send "1335 92 3 1 { 1 } 0 { }\n"
simple_expect "=1335"
send "1336 90 3\n"
1243
# This text is marked twice: user area of person 6, presentation for 7.
1244
simple_expect "=1336 $time_3 6 0 16 2 2 { 0 7 6 3 } 0 \\*"
1245
1246

# Add a couple of more comments
1247
1248
1249
send "1337 92 3 0 { } 2 { 2 00000000 1 [holl "Du har massor fel"] 2 00000000 1 [holl "Du har felast av alla"] }\n"
simple_expect "=1337"
send "1338 90 3\n"
1250
# This text is marked twice: user area of person 6, presentation for 7.
1251
simple_expect "=1338 $time_3 6 0 16 2 2 { 0 7 6 3 } 2 { 2 2 8 $any_time 00000000 1 [holl "Du har massor fel"] 3 2 8 $any_time 00000000 1 [holl "Du har felast av alla"] }"
1252
1253

# test call 93 (modify-conf-info)
1254
send "1339 91 8\n"
1255
1256
# FIXME: should 8:redirect be inheritable?
# FIXME: should 10:alternate-name be inheritable?
1257
1258
1259
extracting_expect "=1339 [holl "Kelly Talisman"] 10011000 ($any_time) $any_time 8 0 8 0 0 0 77 77 1 1 2 0 9 { 1 3 8 $any_time 00000000 1 [holl "C6 My Creator"] 2 3 8 $any_time 00000000 1 [holl "C7 Slightly offensive name, huh"] 3 8 8 $any_time 00000000 0 [holl "E-mail:kelly@hotbox.com"] 4 9 8 $any_time 00000000 1 [holl "compface must die"] 5 10 8 $any_time 00000000 0 [holl "Air"] 6 12 8 $any_time 00000000 1 [holl "PGP public key"] 7 13 8 $any_time 00000000 1 [holl "kelly@hotbox.com"] 8 30 8 $any_time 00000000 0 [holl "text/plain"] 9 30 8 $any_time 00000000 0 [holl "x-kom/basic"] }" time_c_8 1
send "1340 91 8\n"
simple_expect "=1340 [holl "Kelly Talisman"] 10011000 $time_c_8 $time_7 8 0 8 0 0 0 77 77 1 1 2 0 9 { 1 3 8 $time_c_8 00000000 1 [holl "C6 My Creator"] 2 3 8 $time_c_8 00000000 1 [holl "C7 Slightly offensive name, huh"] 3 8 8 $time_c_8 00000000 0 [holl "E-mail:kelly@hotbox.com"] 4 9 8 $time_c_8 00000000 1 [holl "compface must die"] 5 10 8 $time_c_8 00000000 0 [holl "Air"] 6 12 8 $time_c_8 00000000 1 [holl "PGP public key"] 7 13 8 $time_c_8 00000000 1 [holl "kelly@hotbox.com"] 8 30 8 $time_c_8 00000000 0 [holl "text/plain"] 9 30 8 $time_c_8 00000000 0 [holl "x-kom/basic"] }"
1260

1261
1262
1263
1264
send "1341 93 8 2 { 7 1 } 1 { 13 00000000 1 [holl "kelly@lysator.liu.se"] }\n"
simple_expect "=1341"
send "1342 91 8\n"
simple_expect "=1342 [holl "Kelly Talisman"] 10011000 $time_c_8 $time_7 8 0 8 0 0 0 77 77 1 1 2 0 8 { 2 3 8 $time_c_8 00000000 1 [holl "C7 Slightly offensive name, huh"] 3 8 8 $time_c_8 00000000 0 [holl "E-mail:kelly@hotbox.com"] 4 9 8 $time_c_8 00000000 1 [holl "compface must die"] 5 10 8 $time_c_8 00000000 0 [holl "Air"] 6 12 8 $time_c_8 00000000 1 [holl "PGP public key"] 8 30 8 $time_c_8 00000000 0 [holl "text/plain"] 9 30 8 $time_c_8 00000000 0 [holl "x-kom/basic"] 10 13 8 $any_time 00000000 1 [holl "kelly@lysator.liu.se"] }"
1265
1266

# test call 94 (get-info)
1267
1268
send "1343 94\n"
simple_expect "=1343 $server_compat_version 1 2 3 4 0 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1269

Per Cederqvist's avatar
Per Cederqvist committed
1270
1271
# test call 95 (modify-system-info)
talk_to client 2
1272
1273
send "1344 95 0 { } 2 { 9 00000000 1 [holl "compface must die"] 13 00000000 1 [holl "maint@kom"] }\n"
simple_expect "=1344"
Per Cederqvist's avatar
Per Cederqvist committed
1274
# Attempt to set a nonexisting text as faq for the server.
1275
1276
send "1345 95 0 { } 1 { 14 00000000 1 [holl "999"] }\n"
simple_expect "%1345 48 0"
Per Cederqvist's avatar
Per Cederqvist committed
1277

1278
1279
send "1346 94\n"
simple_expect "=1346 $server_compat_version 1 2 3 4 0 2 { 1 9 5 $any_time 00000000 1 [holl "compface must die"] 2 13 5 $any_time 00000000 1 [holl "maint@kom"] }"
Per Cederqvist's avatar
Per Cederqvist committed
1280

1281
1282
send "1347 95 1 { 2 } 0 { }\n"
simple_expect "=1347"
Per Cederqvist's avatar
Per Cederqvist committed
1283

1284
1285
send "1348 94\n"
simple_expect "=1348 $server_compat_version 1 2 3 4 0 1 { 1 9 5 $any_time 00000000 1 [holl "compface must die"] }"
David Byers's avatar
David Byers committed
1286

Per Cederqvist's avatar
Per Cederqvist committed
1287
1288
1289

# test call 96 (query-predefined-aux-items)
talk_to client 1
1290
send "1349 96\n"
1291
simple_expect "=1349 37 { 10104 10103 10102 10101 10100 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 }"
Per Cederqvist's avatar
Per Cederqvist committed
1292
1293

# test call 97 (set-expire)
1294
1295
1296
1297
send "1350 97 10 7123123\n"
simple_expect "=1350"
send "1351 91 10\n"
simple_expect "=1351 [holl "aux in general"] 01001000 $time_c_10 $time_c_10 8 0 8 0 8 0 77 77 0 1 0 7123123 1 { 1 14 8 $time_c_10 00000000 1 [holl "10"] }"
Per Cederqvist's avatar
Per Cederqvist committed
1298
1299

# test call 98 (query-read-texts)