03.exp 49.8 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-2002  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 40 { 10104 10103 10102 10101 10100 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 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

Per Cederqvist's avatar
Per Cederqvist committed
152
153
# Check that the server returns "long-array" if a too long
# array is passed to the accept-async.
154
155
156
# 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
157
simple_expect "%1014 46 0"
158

Per Cederqvist's avatar
Per Cederqvist committed
159
# The above request should not have modified the list of accepted asyncs.
Per Cederqvist's avatar
Per Cederqvist committed
160
161
send "1015 81\n"
simple_expect "=1015 8 { 0 5 7 8 9 11 12 13 }"
162

Per Cederqvist's avatar
Per Cederqvist committed
163
# This array isn't too long, but it contains illegal aux-items.
164
165
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
166
simple_expect "%1016 50 1"
167

Per Cederqvist's avatar
Per Cederqvist committed
168
# Make sure all legal aux-items were added to the list of accepted asyncs.
Per Cederqvist's avatar
Per Cederqvist committed
169
send "1017 81\n"
170
simple_expect "=1017 15 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 19 }"
171

172
173
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
174
simple_expect "%1018 50 2"
175

176
177
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
178
simple_expect "%1019 50 3"
179

Per Cederqvist's avatar
Per Cederqvist committed
180
send "1020 81\n"
181
simple_expect "=1020 15 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 19 }"
182

183
184
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
185
simple_expect "%1021 50 4"
186

Per Cederqvist's avatar
Per Cederqvist committed
187
send "1022 81\n"
188
simple_expect "=1022 15 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 19 }"
189

190
191
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
192
simple_expect "%1023 50 128"
193

194
195
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"
196
simple_expect "%1024 50 20"
197

Per Cederqvist's avatar
Per Cederqvist committed
198
send "1025 81\n"
199
simple_expect "=1025 15 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 19 }"
200

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

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

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

210
211
212
# AUXITEM: All aux-items that can be set on letterboxes should be set
# on person 8, unless the aux-item has semantics that would interfere
# with the tests below.
213
214
send "1029 89 [holl "Kelly Talisman"] [holl "the stars"] 00000000 11 { 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"] 33 00000000 1 1H0 14 00000000 0 [holl "3"] }\n"
Per Cederqvist's avatar
Per Cederqvist committed
215
simple_expect "=1029 8"
216
send "1030 62 8 [holl "the stars"] 0\n"
217
simple_expect ":2 9 8 2"
218
simple_expect "=1030"
219
220
221
222
talk_to client 0
simple_expect ":2 9 8 2"
talk_to client 1

223
send "1031 86 [holl "New-style text 4"] 2 { 0 7 15 6 } 0 { }\n"
224
225
# No async message; person 8 isn't a member of the conferences this
# text goes to.
226
simple_expect "=1031 4"
227
228
229
230
231
232

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.
233
234
send "1032 100 7 8 100 0 00000000\n"
simple_expect "=1032"
235

236
send "1033 86 [holl "New-style text 5"] 2 { 0 7 15 6 } 0 { }\n"
David Byers's avatar
David Byers committed
237
238
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 \\*"
239
simple_expect "=1033 5"
240

241
242
243
244
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

245
send "1034 86 [holl "New-style text 6"] 2 { 0 7 15 8 } 0 { }\n"
246
247
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 \\*"
248
simple_expect "=1034 6"
249
250
251
252
253

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

254
send "1035 86 [holl "New-style text 7"] 2 { 0 1 15 8 } 0 { }\n"
Per Cederqvist's avatar
Per Cederqvist committed
255
256
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 \\*"
257
simple_expect "=1035 7"
258
259
260

talk_to client 0
# No async for client 0 at this point.
261
262
send "1036 35\n"
simple_expect "=1036 $any_time"
263
talk_to client 1
264

Per Cederqvist's avatar
Per Cederqvist committed
265
266
267
268
269
# test call 0 (login)
client_start 2
talk_to client 2
send "A[holl "Foo"]\n"
simple_expect "LysKOM" "client 2 connected"
270
271
272
273
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
274
talk_to client 0
Per Cederqvist's avatar
Per Cederqvist committed
275
276
send "1039 35\n"
simple_expect "=1039 $any_time"
277
278
279
talk_to client 1
send "1040 35\n"
simple_expect "=1040 $any_time"
Per Cederqvist's avatar
Per Cederqvist committed
280
talk_to client 2
281
send "1041 0 8 [holl "the stars"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
282
simple_expect ":2 9 8 3"
283
simple_expect "=1041"
Per Cederqvist's avatar
Per Cederqvist committed
284
285
286
287
288
289
290
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
291
send "1042 1\n"
Per Cederqvist's avatar
Per Cederqvist committed
292
simple_expect ":2 13 8 3"
293
simple_expect "=1042"
Per Cederqvist's avatar
Per Cederqvist committed
294
295
296
297
298
299
300
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
301
302
303
304
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
305
306
# This session has already changed conference to 7 in the preamble above.
# Check that the failed attempts didn't change that.
307
308
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
309
# Check that we can leave all conferences.
310
311
send "1046 2 0\n"
simple_expect "=1046"
Per Cederqvist's avatar
Per Cederqvist committed
312
talk_to client 1
313
simple_expect ":5 6 6 0 1 [holl ""] [idholl "ceder@gratia"]"
Per Cederqvist's avatar
Per Cederqvist committed
314
talk_to client 0
315
316
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
317
# Go to the letterbox and stay there
318
319
send "1048 2 6\n"
simple_expect "=1048"
Per Cederqvist's avatar
Per Cederqvist committed
320
talk_to client 1
321
simple_expect ":5 6 6 6 1 [holl ""] [idholl "ceder@gratia"]"
Per Cederqvist's avatar
Per Cederqvist committed
322
talk_to client 0
323
324
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
325
326
327

# test call 3 (change-name)
talk_to client 0
328
329
330
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
331
simple_expect ":3 5 7 [holl ".So called. Christian Music"] [holl "PRIMa musik"]"
332
simple_expect "=1051"
Per Cederqvist's avatar
Per Cederqvist committed
333
334
335
336
337
338

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
339
340
# test call 4 (change-what-i-am-doing)
talk_to client 0
341
342
send "1052 4 [holl "Running a test suite"]\n"
simple_expect "=1052"
Per Cederqvist's avatar
Per Cederqvist committed
343
talk_to client 1
344
simple_expect ":5 6 6 6 1 [holl "Running a test suite"] [idholl "ceder@gratia"]"
345
send "1053 4 [holl "Accepting i-am-on"]\n"
346
simple_expect ":5 6 8 0 2 [holl "Accepting i-am-on"] [idholl "ic@gratia"]"
347
simple_expect "=1053"
Per Cederqvist's avatar
Per Cederqvist committed
348
349
350

# call 5 (create-person-old) is tested above.
# test call 6 (get-person-stat-old)
351
352
353
354
355
356
357
358
359
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"
360
simple_expect "=1058 [idholl "ceder@gratia.unknown."] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
361
362
363
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"
364
simple_expect "=1060 [idholl "ceder@gratia.unknown."] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
365
366
367
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"
368
simple_expect "=1062 [idholl "ceder@gratia.unknown."] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
Per Cederqvist's avatar
Per Cederqvist committed
369
370

# test call 7 (set-priv-bits)
371
372
send "1063 7 8 0000000000000000\n"
simple_expect "%1063 12 0"
Per Cederqvist's avatar
Per Cederqvist committed
373
talk_to client 2
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
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
394
395

# test call 8 (set-passwd)
396
397
398
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
399
simple_expect "=1075"
400
401
402
403
404
405
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
406
407
408

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

# test call 10 (create-conf-old)
413
414
415
416
417
418
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
419
420

# test call 11 (delete-conf)
421
422
423
424
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
425
426

# test call 12 (lookup-name)
427
428
429
430
431
432
433
434
435
436
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
437
438

# test call 13 (get-conf-stat-older)
439
440
441
442
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
443
444

# test call 14 (add-member-old)
445
446
447
448
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
449
450

# test call 15 (sub-member)
451
send "1094 15 3 6\n"
Per Cederqvist's avatar
Per Cederqvist committed
452
simple_expect ":1 8 3"
453
454
455
simple_expect "=1094"
send "1095 15 3 6\n"
simple_expect "%1095 13 3"
Per Cederqvist's avatar
Per Cederqvist committed
456
457

# test call 16 (set-presentation)
458
459
send "1096 16 7 3\n"
simple_expect "=1096"
Per Cederqvist's avatar
Per Cederqvist committed
460
461
462
# We check the result under call 50 below.

# test call 17 (set-etc-motd)
463
464
send "1097 17 7 2\n"
simple_expect "=1097"
Per Cederqvist's avatar
Per Cederqvist committed
465
466
467
# We check the result under call 50 below.

# test call 18 (set-supervisor)
468
469
send "1098 18 7 7\n"
simple_expect "=1098"
Per Cederqvist's avatar
Per Cederqvist committed
470
471
472
# We check the result under call 50 below.

# test call 19 (set-permitted-submitters)
473
474
send "1099 19 7 8\n"
simple_expect "=1099"
Per Cederqvist's avatar
Per Cederqvist committed
475
476
477
# We check the result under call 50 below.

# test call 20 (set-super-conf)
478
479
send "1100 20 7 4\n"
simple_expect "=1100"
Per Cederqvist's avatar
Per Cederqvist committed
480
481
482
# We check the result under call 50 below.

# test call 21 (set-conf-type)
483
484
485
486
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
487
488
489
# We check the result under call 50 below.

# test call 22 (set-garb-nice)
490
491
send "1103 22 7 144\n"
simple_expect "=1103"
Per Cederqvist's avatar
Per Cederqvist committed
492
493
494
# We check the result under call 50 below.

# test call 23 (get-marks) and call 24 (mark-text-old)
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
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
515
516
517

# call 25 is tested extensively in 02.exp

Per Cederqvist's avatar
Per Cederqvist committed
518
519
# 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.
520
521
send "1114 35\n"
extracting_expect "=1114 ($any_time)" user_active_1 1
Per Cederqvist's avatar
Per Cederqvist committed
522
523
524
525
526
527
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
528
# test call 26 (get-text-stat-old)
529
530
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
531

Per Cederqvist's avatar
Per Cederqvist committed
532
# test call 27 (mark-as-read) and 40 (set-unread)
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
667
668
669
670
671
672
673
674
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
675
676
677
678

# call 28 is tested above

# test call 29 (delete-text)
Per Cederqvist's avatar
Per Cederqvist committed
679
680
# (First, check that get_last_text gives a proper result before the
# text is deleted.)
681
682
683
684
685
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
686
# No new'n'fancy async message here.
687
simple_expect "=1175"
Per Cederqvist's avatar
Per Cederqvist committed
688
689

talk_to client 1
Per Cederqvist's avatar
Per Cederqvist committed
690
# The text is marked since it is motd of conference 7.
Per Cederqvist's avatar
Per Cederqvist committed
691
692
693
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
694
695
# Test that mark-as-read of local text number 1 steps past local text
# 2 when it doesn't exist.
696
697
698
699
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
700

701
702
703
704
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
705
706

# test call 30 (add-recipient)
707
708
709
send "1180 30 3 2 0\n"
simple_expect "=1180"
send "1181 26 3\n"
Per Cederqvist's avatar
Per Cederqvist committed
710
# This is marked since text 3 is presentation of conf 7.
711
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
712
713

# test call 31 (sub-recipient)
714
715
716
send "1182 31 3 2\n"
simple_expect "=1182"
send "1183 26 3\n"
Per Cederqvist's avatar
Per Cederqvist committed
717
# This is marked since text 3 is presentation of conf 7.
718
simple_expect "=1183 $any_time 6 0 16 1 2 { 0 7 6 3 }"
Per Cederqvist's avatar
Per Cederqvist committed
719
720

# test call 32 (add-comment)
721
send "1184 32 3 1\n"
Per Cederqvist's avatar
Per Cederqvist committed
722
723
724
simple_expect "=1184"
send "1185 26 3\n"
# This is marked since text 3 is presentation of conf 7.
725
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
726
send "1186 26 1\n"
727
728
729
730
731
732
733
734
735
736
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
737
738

# test call 34 (get-map)
739
740
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
741
742

# test call 35 (get-time)
743
744
send "1191 35\n"
simple_expect "=1191 $any_time"
Per Cederqvist's avatar
Per Cederqvist committed
745
746

# test call 36 (get-info-old)
747
748
send "1192 36\n"
simple_expect "=1192 $server_compat_version 1 2 3 4 0"
Per Cederqvist's avatar
Per Cederqvist committed
749
750

# test call 37 (add-footnote)
751
send "1193 37 3 1\n"
Per Cederqvist's avatar
Per Cederqvist committed
752
753
754
simple_expect "=1193"
send "1194 26 3\n"
# This is marked since text 3 is presentation of conf 7.
755
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
756
send "1195 26 1\n"
757
758
759
760
761
762
763
764
765
766
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
767
768

# test call 39 (who-is-on-old)
769
770
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
771
772
773
774
775

# call 40 (set-unread) is tested above

# test call 41 (set-motd-of-lyskom)
talk_to client 2
776
777
778
779
780
781
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
782

783
784
send "1203 36\n"
simple_expect "=1203 $server_compat_version 1 2 3 4 7"
Per Cederqvist's avatar
Per Cederqvist committed
785
786
787
788

# call 42 (enable) is tested above

# test call 43 (sync-kom)
789
790
791
792
793
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
794
795
simple_expect ":0 7"
simple_expect ":0 7"
796
simple_expect "=1206"
Per Cederqvist's avatar
Per Cederqvist committed
797
798
799
800
801
802
803
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
804
805
send "1207 42 0\n"
simple_expect "=1207"
Per Cederqvist's avatar
Per Cederqvist committed
806
807
808
809

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

# test call 45 (broadcast)
810
send "1208 45 [holl "a broadcast message"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
811
simple_expect ":3 12 0 5 [holl "a broadcast message"]"
812
simple_expect "=1208"
Per Cederqvist's avatar
Per Cederqvist committed
813
814
815
816
817
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
818
# test call 46 (get-membership-old)
819
820
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
821
822

# test call 47 (get-created-texts)
823
824
send "1210 47 6 1 100\n"
simple_expect "=1210 1 3 { 1 0 3 }"
Per Cederqvist's avatar
Per Cederqvist committed
825
826

# test call 48 (get-members-old)
827
828
send "1211 48 7 0 100\n"
simple_expect "=1211 2 { 6 8 }"
Per Cederqvist's avatar
Per Cederqvist committed
829
830

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

Per Cederqvist's avatar
Per Cederqvist committed
834
# test call 50 (get-conf-stat-old)
835
836
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
837
# test call 51 (who-is-on)
838
send "1214 51\n"
839
simple_expect "=1214 2 { 8 0 2 [holl "Accepting i-am-on"] [idholl "ic@gratia"] 6 6 1 [holl "Running a test suite"] [idholl "ceder@gratia"] }"
Per Cederqvist's avatar
Per Cederqvist committed
840
841

# test call 52 (get-unread-confs)
842
843
send "1215 52 6\n"
simple_expect "=1215 2 { 6 7 }"
Per Cederqvist's avatar
Per Cederqvist committed
844
845

# test call 53 (send-message)
846
847
send "1216 53 8 [holl "hullo eight"]\n"
simple_expect "=1216"
Per Cederqvist's avatar
Per Cederqvist committed
848
849
850
talk_to client 1
simple_expect ":3 12 8 6 [holl "hullo eight"]"
talk_to client 0
851
send "1217 53 7 [holl "seven"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
852
simple_expect ":3 12 7 6 [holl "seven"]"
853
simple_expect "=1217"
Per Cederqvist's avatar
Per Cederqvist committed
854
855
856
talk_to client 1
simple_expect ":3 12 7 6 [holl "seven"]"
talk_to client 0
857
send "1218 53 0 [holl "all"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
858
simple_expect ":3 12 0 6 [holl "all"]"
859
simple_expect "=1218"
Per Cederqvist's avatar
Per Cederqvist committed
860
861
862
863
864
865
866
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)
867
send "1219 54 2\n"
868
simple_expect "=1219 8 0 2 [holl "Accepting i-am-on"] [idholl "ic@gratia"] $any_num $any_time"
Per Cederqvist's avatar
Per Cederqvist committed
869
870
871

# test call 55 (disconnect)
talk_to client 2
872
873
send "1220 55 3\n"
simple_expect "=1220"
Per Cederqvist's avatar
Per Cederqvist committed
874
875
876
877
client_death 2

# test call 56 (who-am-i)
talk_to client 0
878
879
send "1221 56\n"
simple_expect "=1221 1"
Per Cederqvist's avatar
Per Cederqvist committed
880
881

# test call 57 (set-user-area)
882
883
884
send "1222 57 6 3\n"
simple_expect "=1222"
send "1223 49 6\n"
885
simple_expect "=1223 [idholl "ceder@gratia.unknown."] 0000010000000000 00000000 $any_time 3 0 1 0 48 0 0 0 2 1 3 0 2"
Per Cederqvist's avatar
Per Cederqvist committed
886
887

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

891
892
send "1225 35\n"
extracting_expect "=1225 ($any_time)" post_7 1
Per Cederqvist's avatar
Per Cederqvist committed
893
894
895
896
897
898
while {"$post_7" == "$time_7"} {
    sleep 0.1
    send "999 35\n"
    extracting_expect "=999 ($any_time)" post_7 1
}

899
900
901
902
903
904
905
906
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
907
908

# test call 59 (create-anonymous-text-old)
909
910
send "1230 59 [holl "Anon text 8"] 1 { 0 2 }\n"
simple_expect "=1230 8"
Per Cederqvist's avatar
Per Cederqvist committed
911
# check that the number of created texts/bytes does not increase
912
send "1231 49 6\n"
913
simple_expect "=1231 [idholl "ceder@gratia.unknown."] 0000010000000000 00000000 $any_time 3 0 1 0 48 0 0 0 2 1 3 0 2"
Per Cederqvist's avatar
Per Cederqvist committed
914
915

# test call 60 (find-next-text-no)
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
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
934
935

# test call 61 (find-previous-text-no)
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
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
960
961
962
963

# call 62 is tested above

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

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

# test call 65 (re-lookup-person)
972
973
974
975
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
976
977

# test call 66 (re-lookup-conf)
978
979
send "1257 66 [holl "nya"]\n"
simple_expect "=1257 2 { 1 2 }"
Per Cederqvist's avatar
Per Cederqvist committed
980
981

# test call 67 (lookup-person)
982
983
send "1258 67 [holl "k t"]\n"
simple_expect "=1258 1 { 8 }"
Per Cederqvist's avatar
Per Cederqvist committed
984
985

# test call 68 (lookup-conf)
986
987
send "1259 68 [holl "p m"]\n"
simple_expect "=1259 3 { 1 2 7 }"
Per Cederqvist's avatar
Per Cederqvist committed
988
989
990

# test call 69 (set-client-version)
talk_to client 1
991
992
send "1260 69 [holl "i changed my mind"] [holl "99.9"]\n"
simple_expect "%1260 41 0"
Per Cederqvist's avatar
Per Cederqvist committed
993
994
995
talk_to client 0

# test call 70 (get-client-name)
996
997
send "1261 70 2\n"
simple_expect "=1261 [holl "dgt03"]"
Per Cederqvist's avatar
Per Cederqvist committed
998
999

# test call 71 (get-client-version)
1000
1001
send "1262 71 2\n"
simple_expect "=1262 [holl "sc 1"]"
Per Cederqvist's avatar
Per Cederqvist committed
1002
1003

# test call 72 (mark-text)
1004
send "1263 72 1 92\n"
Per Cederqvist's avatar
Per Cederqvist committed
1005
simple_expect "=1263"
1006
1007
1008
send "1264 72 3 0\n"
simple_expect "=1264"
send "1265 72 4 91\n"
Per Cederqvist's avatar
Per Cederqvist committed
1009
simple_expect "=1265"
1010
send "1266 72 4 98\n"
Per Cederqvist's avatar
Per Cederqvist committed
1011
1012
simple_expect "=1266"
send "1267 23\n"
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
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
1030
1031

# test call 74 (re-z-lookup)
1032
1033
1034
1035
1036
1037
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
1038
# This is a meaningless combination, so test it.
1039
1040
send "1278 74 [holl "P.*r"] 0 0\n"
simple_expect "=1278 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1041
1042

# test call 75 (get-version-info)
1043
1044
send "1279 75\n"
simple_expect "=1279 $protocol_a_level [holl "$server_software"] [holl "$server_version"]"
Per Cederqvist's avatar
Per Cederqvist committed
1045
1046

# test call 76 (lookup-z-name)
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
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
1057
1058

# test call 77 (set-last-read)
1059
1060
1061
1062
1063
1064
1065
1066
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"
1067
simple_expect "=1288 $any_time 7 100 2 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1068
1069

# Local text number 2 no longer exists
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
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
1089
1090
1091

# Check what happens when we try to set last-text-read to a local text
# number that doesn't yet exist.
1092
1093
1094
1095
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
1096

Per Cederqvist's avatar
Per Cederqvist committed
1097
# test call 78 (get-uconf-stat)
1098
1099
send "1299 78 7\n"
simple_expect "=1299 [holl "PRIMa musik"] 01001000 6 144"
Per Cederqvist's avatar
Per Cederqvist committed
1100
1101
1102
1103
1104

# test call 79 (set-info)
client_start 2
send "A3Hfoo\n"
simple_expect "LysKOM"
1105
1106
1107
1108
1109
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
1110
1111
simple_expect "=1302"
send "1303 94\n"
1112
simple_expect "=1303 $server_compat_version 7 1 2 8 3 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1113
send "1304 36\n"
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
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
1129
talk_to client 1
Per Cederqvist's avatar
Per Cederqvist committed
1130

1131
1132
# 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
1133
1134
1135

# test call 82 (user-active) and call 83 (who-is-on-dynamic)
# Wait for the second tick.
1136
1137
send "1312 35\n"
extracting_expect "=1312 ($any_time)" user_active_2 1
Per Cederqvist's avatar
Per Cederqvist committed
1138
1139
1140
1141
1142
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
1143

1144
1145
1146
1147
# Stupid me.  We have to wait for a third tick as well,
# since we test that *more* than two seconds has passed.
# Maybe we should move the waits for the two previous ticks
# earlier in the test.
1148
1149
  send "101313 35\n"
  extracting_expect "=101313 ($any_time)" user_active_3 1
1150
1151
1152
1153
1154
1155
while {"$user_active_3" == "$user_active_2"} {
    sleep 0.1
    send "999 35\n"
    extracting_expect "=999 ($any_time)" user_active_3 1
}

1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
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
1176

1177
# This test is timing sensitive.  It will fail if the server is extremely slow.
1178
1179
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
1180
1181

# test call 84 (get-static-session-info)
1182
send "1323 84 2\n"
1183
simple_expect "=1323 [holl "ic@gratia"] [holl "$lyskomd_host"] [holl "unknown"] $any_time"
Per Cederqvist's avatar
Per Cederqvist committed
1184
1185

# test call 85 (get-collate-table)
1186
1187
send "1324 85\n"
unanchored_expect "^MRK:client1: =1324 256H" "collate-table start"
1188
unanchored_expect "$nl" "get-collate-table newline before digits"
1189
1190
1191
# NOTE: Comment out the next two lines if runtest seems to hang.
# NOTE: But also notify ceder of the versions of dejagnu, TCL and expect
# NOTE: that you are using, and try to upgrade to current versions first.
1192
unanchored_expect "0123456789" "collate digits"
Per Cederqvist's avatar
Per Cederqvist committed
1193
unanchored_expect "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "collate upper"
1194
unanchored_expect "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "collate lower"
Per Cederqvist's avatar
Per Cederqvist committed
1195
1196
unanchored_expect "\377$nl" "collate end"

Per Cederqvist's avatar
Per Cederqvist committed
1197
# test call 86 (create-text)
1198
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
1199
1200
1201
1202
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"] }"
1203
simple_expect "=1325 9"
Per Cederqvist's avatar
Per Cederqvist committed
1204
1205
1206
1207
1208
1209

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)
1210
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
1211
1212
1213
1214
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"] }"
1215
simple_expect "=1326 10"
Per Cederqvist's avatar
Per Cederqvist committed
1216
1217
1218
1219
1220
1221

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)
1222
1223
1224
1225
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
1226
1227

# test call 89 (create-person)
1228
1229
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
1230
1231

# test call 90 (get-text-stat)
1232
send "1330 90 10\n"
David Byers's avatar
David Byers committed
1233
# Text 10 should have two extra aux-items since it is the FAQ of conferences 10 and 11.
1234
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
1235

Per Cederqvist's avatar
Per Cederqvist committed
1236
# test call 91 (get-conf-stat)
1237
1238
1239
1240
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"] }"
1241
1242
1243
1244

# test call 92 (modify-text-info)

# Add a short notice.
1245
1246
1247
send "1333 92 3 0 { } 1 { 2 00000000 1 [holl "Du har fel"] }\n"
simple_expect "=1333"
send "1334 90 3\n"
1248
# This text is marked twice: user area of person 6, presentation for 7.
1249
simple_expect "=1334 $time_3 6 0 16 2 2 { 0 7 6 3 } 2 { 1 28 8 $any_time 00001000 0 [holl "8"] 2 2 8 $any_time 00000000 1 [holl "Du har fel"] }"
1250
1251

# Remove it.
1252
send "1335 92 3 1 { 2 } 0 { }\n"
1253
1254
simple_expect "=1335"
send "1336 90 3\n"
1255
# This text is marked twice: user area of person 6, presentation for 7.
1256
simple_expect "=1336 $time_3 6 0 16 2 2 { 0 7 6 3 } 1 { 1 28 8 $any_time 00001000 0 [holl "8"] }"
1257
1258

# Add a couple of more comments
1259
1260
1261
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"
1262
# This text is marked twice: user area of person 6, presentation for 7.
1263
simple_expect "=1338 $time_3 6 0 16 2 2 { 0 7 6 3 } 3 { 1 28 8 $any_time 00001000 0 [holl "8"] 3 2 8 $any_time 00000000 1 [holl "Du har massor fel"] 4 2 8 $any_time 00000000 1 [holl "Du har felast av alla"] }"
1264
1265

# test call 93 (modify-conf-info)
1266
send "1339 91 8\n"
1267
extracting_expect "=1339 [holl "Kelly Talisman"] 10011000 ($any_time) $any_time 8 0 8 0 0 0 77 77 1 1 2 0 11 { 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"] 10 33 8 $any_time 00000000 1 [holl "0"] 11 14 8 $any_time 00000000 1 [holl "3"] }" time_c_8 1
1268
send "1340 91 8\n"
1269
simple_expect "=1340 [holl "Kelly Talisman"] 10011000 $time_c_8 $time_7 8 0 8 0 0 0 77 77 1 1 2 0 11 { 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"] 10 33 8 $any_time 00000000 1 [holl "0"] 11 14 8 $any_time 00000000 1 [holl "3"] }"
1270

1271
1272
1273
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"
1274
simple_expect "=1342 [holl "Kelly Talisman"] 10011000 $time_c_8 $time_7 8 0 8 0 0 0 77 77 1 1 2 0 10 { 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 33 8 $any_time 00000000 1 [holl "0"] 11 14 8 $any_time 00000000 1 [holl "3"] 12 13 8 $any_time 00000000 1 [holl "kelly@lysator.liu.se"] }"
1275
1276

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

Per Cederqvist's avatar
Per Cederqvist committed
1280
1281
# test call 95 (modify-system-info)
talk_to client 2
1282
1283
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
1284
# Attempt to set a nonexisting text as faq for the server.
1285
1286
send "1345 95 0 { } 1 { 14 00000000 1 [holl "999"] }\n"
simple_expect "%1345 48 0"