03.exp 56 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
1
# Test suite for lyskomd.
2
# Copyright (C) 1998-2003  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
#
# 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.
#
Per Cederqvist's avatar
Per Cederqvist committed
22
# Please report bugs at http://bugzilla.lysator.liu.se/. 
Per Cederqvist's avatar
Per Cederqvist committed
23
24


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 20 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 }"
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 20 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 }"
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 20 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 }"
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 25"
197

Per Cederqvist's avatar
Per Cederqvist committed
198
send "1025 81\n"
199
simple_expect "=1025 20 { 0 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 24 }"
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
# 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
212
213
214
215
# with the tests below.  Some items must be added once the person is created.
# Do that below.
send "1029 89 [holl "Kelly Talisman"] [holl "the stars"] 00000000 10 { 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 "2 text/plain"] 30 00000000 0 [holl "2 x-kom/basic"] 33 00000000 1 1H0 }\n"
Per Cederqvist's avatar
Per Cederqvist committed
216
simple_expect "=1029 8"
217
send "1030 62 8 [holl "the stars"] 0\n"
218
simple_expect ":2 9 8 2"
219
simple_expect "=1030"
220
221
222
223
talk_to client 0
simple_expect ":2 9 8 2"
talk_to client 1

224
225
226
227
228
229
230
# AUXITEM: Add items that cannot be added at the time of creation.
# (indent to avoid renumbering)
if {1} {
    send "990 93 8 0 { } 1 { 14 00000000 0 [holl "3"] }\n"
    simple_expect "=990"
}

231
send "1031 86 [holl "New-style text 4"] 2 { 0 7 15 6 } 0 { }\n"
232
233
# No async message; person 8 isn't a member of the conferences this
# text goes to.
234
simple_expect "=1031 4"
235
236
237
238
239
240

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.
241
242
send "1032 100 7 8 100 0 00000000\n"
simple_expect "=1032"
243

244
send "1033 86 [holl "New-style text 5"] 2 { 0 7 15 6 } 0 { }\n"
David Byers's avatar
David Byers committed
245
246
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 \\*"
247
simple_expect "=1033 5"
248

249
250
251
252
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

253
send "1034 86 [holl "New-style text 6"] 2 { 0 7 15 8 } 0 { }\n"
254
255
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 \\*"
256
simple_expect "=1034 6"
257
258
259
260
261

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

262
send "1035 86 [holl "New-style text 7"] 2 { 0 1 15 8 } 0 { }\n"
Per Cederqvist's avatar
Per Cederqvist committed
263
264
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 \\*"
265
simple_expect "=1035 7"
266
267
268

talk_to client 0
# No async for client 0 at this point.
269
270
send "1036 35\n"
simple_expect "=1036 $any_time"
271
talk_to client 1
272

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

# test call 3 (change-name)
talk_to client 0
336
337
338
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
339
simple_expect ":3 5 7 [holl ".So called. Christian Music"] [holl "PRIMa musik"]"
340
simple_expect "=1051"
Per Cederqvist's avatar
Per Cederqvist committed
341
342
343
344
345
346

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
347
348
# test call 4 (change-what-i-am-doing)
talk_to client 0
349
350
send "1052 4 [holl "Running a test suite"]\n"
simple_expect "=1052"
Per Cederqvist's avatar
Per Cederqvist committed
351
talk_to client 1
352
simple_expect ":5 6 6 6 1 [holl "Running a test suite"] [idholl "ceder@gratia"]"
353
send "1053 4 [holl "Accepting i-am-on"]\n"
354
simple_expect ":5 6 8 0 2 [holl "Accepting i-am-on"] [idholl "ic@gratia"]"
355
simple_expect "=1053"
Per Cederqvist's avatar
Per Cederqvist committed
356
357
358

# call 5 (create-person-old) is tested above.
# test call 6 (get-person-stat-old)
359
360
361
362
363
364
365
366
367
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"
368
simple_expect "=1058 [idholl "ceder@gratia.unknown."] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
369
370
371
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"
372
simple_expect "=1060 [idholl "ceder@gratia.unknown."] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
373
374
375
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"
376
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
377
378

# test call 7 (set-priv-bits)
379
380
send "1063 7 8 0000000000000000\n"
simple_expect "%1063 12 0"
Per Cederqvist's avatar
Per Cederqvist committed
381
talk_to client 2
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
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
402
403

# test call 8 (set-passwd)
404
405
406
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
407
simple_expect "=1075"
408
409
410
411
412
413
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
414
415
416

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

# test call 10 (create-conf-old)
421
422
423
424
425
426
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
427
428

# test call 11 (delete-conf)
429
430
431
432
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
433
434

# test call 12 (lookup-name)
435
436
437
438
439
440
441
442
443
444
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
445
446

# test call 13 (get-conf-stat-older)
447
448
449
450
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
451
452

# test call 14 (add-member-old)
453
454
455
456
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
457
458

# test call 15 (sub-member)
459
send "1094 15 3 6\n"
Per Cederqvist's avatar
Per Cederqvist committed
460
simple_expect ":1 8 3"
461
462
463
simple_expect "=1094"
send "1095 15 3 6\n"
simple_expect "%1095 13 3"
Per Cederqvist's avatar
Per Cederqvist committed
464
465

# test call 16 (set-presentation)
466
467
send "1096 16 7 3\n"
simple_expect "=1096"
Per Cederqvist's avatar
Per Cederqvist committed
468
469
470
# We check the result under call 50 below.

# test call 17 (set-etc-motd)
471
472
send "1097 17 7 2\n"
simple_expect "=1097"
Per Cederqvist's avatar
Per Cederqvist committed
473
474
475
# We check the result under call 50 below.

# test call 18 (set-supervisor)
476
477
send "1098 18 7 7\n"
simple_expect "=1098"
Per Cederqvist's avatar
Per Cederqvist committed
478
479
480
# We check the result under call 50 below.

# test call 19 (set-permitted-submitters)
481
482
send "1099 19 7 8\n"
simple_expect "=1099"
Per Cederqvist's avatar
Per Cederqvist committed
483
484
485
# We check the result under call 50 below.

# test call 20 (set-super-conf)
486
487
send "1100 20 7 4\n"
simple_expect "=1100"
Per Cederqvist's avatar
Per Cederqvist committed
488
489
490
# We check the result under call 50 below.

# test call 21 (set-conf-type)
491
492
493
494
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
495
496
497
# We check the result under call 50 below.

# test call 22 (set-garb-nice)
498
499
send "1103 22 7 144\n"
simple_expect "=1103"
Per Cederqvist's avatar
Per Cederqvist committed
500
501
502
# We check the result under call 50 below.

# test call 23 (get-marks) and call 24 (mark-text-old)
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
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
523
524
525

# call 25 is tested extensively in 02.exp

Per Cederqvist's avatar
Per Cederqvist committed
526
527
# 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.
528
529
send "1114 35\n"
extracting_expect "=1114 ($any_time)" user_active_1 1
Per Cederqvist's avatar
Per Cederqvist committed
530
531
532
533
534
535
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
536
# test call 26 (get-text-stat-old)
537
538
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
539

Per Cederqvist's avatar
Per Cederqvist committed
540
# test call 27 (mark-as-read) and 40 (set-unread)
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
675
676
677
678
679
680
681
682
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
683
684
685
686

# call 28 is tested above

# test call 29 (delete-text)
Per Cederqvist's avatar
Per Cederqvist committed
687
688
# (First, check that get_last_text gives a proper result before the
# text is deleted.)
689
690
691
692
693
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
694
# No new'n'fancy async message here.
695
simple_expect "=1175"
Per Cederqvist's avatar
Per Cederqvist committed
696
697

talk_to client 1
Per Cederqvist's avatar
Per Cederqvist committed
698
# The text is marked since it is motd of conference 7.
Per Cederqvist's avatar
Per Cederqvist committed
699
700
701
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
702
703
# Test that mark-as-read of local text number 1 steps past local text
# 2 when it doesn't exist.
704
705
706
707
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
708

709
710
711
712
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
713
714

# test call 30 (add-recipient)
715
716
717
send "1180 30 3 2 0\n"
simple_expect "=1180"
send "1181 26 3\n"
Per Cederqvist's avatar
Per Cederqvist committed
718
# This is marked since text 3 is presentation of conf 7.
719
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
720
721

# test call 31 (sub-recipient)
722
723
724
send "1182 31 3 2\n"
simple_expect "=1182"
send "1183 26 3\n"
Per Cederqvist's avatar
Per Cederqvist committed
725
# This is marked since text 3 is presentation of conf 7.
726
simple_expect "=1183 $any_time 6 0 16 1 2 { 0 7 6 3 }"
Per Cederqvist's avatar
Per Cederqvist committed
727
728

# test call 32 (add-comment)
729
send "1184 32 3 1\n"
Per Cederqvist's avatar
Per Cederqvist committed
730
731
732
simple_expect "=1184"
send "1185 26 3\n"
# This is marked since text 3 is presentation of conf 7.
733
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
734
send "1186 26 1\n"
735
736
737
738
739
740
741
742
743
744
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
745
746

# test call 34 (get-map)
747
748
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
749
750

# test call 35 (get-time)
751
752
send "1191 35\n"
simple_expect "=1191 $any_time"
Per Cederqvist's avatar
Per Cederqvist committed
753
754

# test call 36 (get-info-old)
755
756
send "1192 36\n"
simple_expect "=1192 $server_compat_version 1 2 3 4 0"
Per Cederqvist's avatar
Per Cederqvist committed
757
758

# test call 37 (add-footnote)
759
send "1193 37 3 1\n"
Per Cederqvist's avatar
Per Cederqvist committed
760
761
762
simple_expect "=1193"
send "1194 26 3\n"
# This is marked since text 3 is presentation of conf 7.
763
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
764
send "1195 26 1\n"
765
766
767
768
769
770
771
772
773
774
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
775
776

# test call 39 (who-is-on-old)
777
778
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
779
780
781
782
783

# call 40 (set-unread) is tested above

# test call 41 (set-motd-of-lyskom)
talk_to client 2
784
785
786
787
788
789
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
790

791
792
send "1203 36\n"
simple_expect "=1203 $server_compat_version 1 2 3 4 7"
Per Cederqvist's avatar
Per Cederqvist committed
793
794
795
796

# call 42 (enable) is tested above

# test call 43 (sync-kom)
797
798
799
800
801
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
802
803
simple_expect ":0 7"
simple_expect ":0 7"
804
simple_expect "=1206"
Per Cederqvist's avatar
Per Cederqvist committed
805
806
807
808
809
810
811
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
812
813
send "1207 42 0\n"
simple_expect "=1207"
Per Cederqvist's avatar
Per Cederqvist committed
814
815
816
817

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

# test call 45 (broadcast)
818
send "1208 45 [holl "a broadcast message"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
819
simple_expect ":3 12 0 5 [holl "a broadcast message"]"
820
simple_expect "=1208"
Per Cederqvist's avatar
Per Cederqvist committed
821
822
823
824
825
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
826
# test call 46 (get-membership-old)
827
828
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
829
830

# test call 47 (get-created-texts)
831
832
send "1210 47 6 1 100\n"
simple_expect "=1210 1 3 { 1 0 3 }"
Per Cederqvist's avatar
Per Cederqvist committed
833
834

# test call 48 (get-members-old)
835
836
send "1211 48 7 0 100\n"
simple_expect "=1211 2 { 6 8 }"
Per Cederqvist's avatar
Per Cederqvist committed
837
838

# test call 49 (get-person-stat)
839
send "1212 49 6\n"
840
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
841

Per Cederqvist's avatar
Per Cederqvist committed
842
# test call 50 (get-conf-stat-old)
843
844
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
845
# test call 51 (who-is-on)
846
send "1214 51\n"
847
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
848
849

# test call 52 (get-unread-confs)
850
851
send "1215 52 6\n"
simple_expect "=1215 2 { 6 7 }"
Per Cederqvist's avatar
Per Cederqvist committed
852
853

# test call 53 (send-message)
854
855
send "1216 53 8 [holl "hullo eight"]\n"
simple_expect "=1216"
Per Cederqvist's avatar
Per Cederqvist committed
856
857
858
talk_to client 1
simple_expect ":3 12 8 6 [holl "hullo eight"]"
talk_to client 0
859
send "1217 53 7 [holl "seven"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
860
simple_expect ":3 12 7 6 [holl "seven"]"
861
simple_expect "=1217"
Per Cederqvist's avatar
Per Cederqvist committed
862
863
864
talk_to client 1
simple_expect ":3 12 7 6 [holl "seven"]"
talk_to client 0
865
send "1218 53 0 [holl "all"]\n"
Per Cederqvist's avatar
Per Cederqvist committed
866
simple_expect ":3 12 0 6 [holl "all"]"
867
simple_expect "=1218"
Per Cederqvist's avatar
Per Cederqvist committed
868
869
870
871
872
873
874
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)
875
send "1219 54 2\n"
876
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
877
878
879

# test call 55 (disconnect)
talk_to client 2
880
881
send "1220 55 3\n"
simple_expect "=1220"
Per Cederqvist's avatar
Per Cederqvist committed
882
883
884
885
client_death 2

# test call 56 (who-am-i)
talk_to client 0
886
887
send "1221 56\n"
simple_expect "=1221 1"
Per Cederqvist's avatar
Per Cederqvist committed
888
889

# test call 57 (set-user-area)
890
891
892
send "1222 57 6 3\n"
simple_expect "=1222"
send "1223 49 6\n"
893
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
894
895

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

899
900
send "1225 35\n"
extracting_expect "=1225 ($any_time)" post_7 1
Per Cederqvist's avatar
Per Cederqvist committed
901
902
903
904
905
906
while {"$post_7" == "$time_7"} {
    sleep 0.1
    send "999 35\n"
    extracting_expect "=999 ($any_time)" post_7 1
}

907
908
909
910
911
912
913
914
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
915
916

# test call 59 (create-anonymous-text-old)
917
918
send "1230 59 [holl "Anon text 8"] 1 { 0 2 }\n"
simple_expect "=1230 8"
Per Cederqvist's avatar
Per Cederqvist committed
919
# check that the number of created texts/bytes does not increase
920
send "1231 49 6\n"
921
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
922
923

# test call 60 (find-next-text-no)
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
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
942
943

# test call 61 (find-previous-text-no)
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
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
968
969
970
971

# call 62 is tested above

# test call 63 (who-is-on-ident)
972
send "1253 63\n"
973
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
974
975

# test call 64 (get-session-info-ident)
976
send "1254 64 2\n"
977
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
978
979

# test call 65 (re-lookup-person)
980
981
982
983
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
984
985

# test call 66 (re-lookup-conf)
986
987
send "1257 66 [holl "nya"]\n"
simple_expect "=1257 2 { 1 2 }"
Per Cederqvist's avatar
Per Cederqvist committed
988
989

# test call 67 (lookup-person)
990
991
send "1258 67 [holl "k t"]\n"
simple_expect "=1258 1 { 8 }"
Per Cederqvist's avatar
Per Cederqvist committed
992
993

# test call 68 (lookup-conf)
994
995
send "1259 68 [holl "p m"]\n"
simple_expect "=1259 3 { 1 2 7 }"
Per Cederqvist's avatar
Per Cederqvist committed
996
997
998

# test call 69 (set-client-version)
talk_to client 1
999
1000
send "1260 69 [holl "i changed my mind"] [holl "99.9"]\n"
simple_expect "%1260 41 0"
Per Cederqvist's avatar
Per Cederqvist committed
1001
1002
1003
talk_to client 0

# test call 70 (get-client-name)
1004
1005
send "1261 70 2\n"
simple_expect "=1261 [holl "dgt03"]"
Per Cederqvist's avatar
Per Cederqvist committed
1006
1007

# test call 71 (get-client-version)
1008
1009
send "1262 71 2\n"
simple_expect "=1262 [holl "sc 1"]"
Per Cederqvist's avatar
Per Cederqvist committed
1010
1011

# test call 72 (mark-text)
1012
send "1263 72 1 92\n"
Per Cederqvist's avatar
Per Cederqvist committed
1013
simple_expect "=1263"
1014
1015
1016
send "1264 72 3 0\n"
simple_expect "=1264"
send "1265 72 4 91\n"
Per Cederqvist's avatar
Per Cederqvist committed
1017
simple_expect "=1265"
1018
send "1266 72 4 98\n"
Per Cederqvist's avatar
Per Cederqvist committed
1019
1020
simple_expect "=1266"
send "1267 23\n"
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
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
1038
1039

# test call 74 (re-z-lookup)
1040
1041
1042
1043
1044
1045
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
1046
# This is a meaningless combination, so test it.
1047
1048
send "1278 74 [holl "P.*r"] 0 0\n"
simple_expect "=1278 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1049
1050

# test call 75 (get-version-info)
1051
1052
send "1279 75\n"
simple_expect "=1279 $protocol_a_level [holl "$server_software"] [holl "$server_version"]"
Per Cederqvist's avatar
Per Cederqvist committed
1053
1054

# test call 76 (lookup-z-name)
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
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
1065
1066

# test call 77 (set-last-read)
1067
1068
1069
1070
1071
1072
1073
1074
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"
1075
simple_expect "=1288 $any_time 7 100 2 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
1076
1077

# Local text number 2 no longer exists
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
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
1097
1098
1099

# Check what happens when we try to set last-text-read to a local text
# number that doesn't yet exist.
1100
1101
1102
1103
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
1104

Per Cederqvist's avatar
Per Cederqvist committed
1105
# test call 78 (get-uconf-stat)
1106
1107
send "1299 78 7\n"
simple_expect "=1299 [holl "PRIMa musik"] 01001000 6 144"
Per Cederqvist's avatar
Per Cederqvist committed
1108
1109
1110
1111
1112

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

1139
1140
# 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
1141
1142
1143

# test call 82 (user-active) and call 83 (who-is-on-dynamic)
# Wait for the second tick.
1144
1145
send "1312 35\n"
extracting_expect "=1312 ($any_time)" user_active_2 1
Per Cederqvist's avatar
Per Cederqvist committed
1146
1147
1148
1149
1150
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
1151

1152
1153
1154
1155
# 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.
1156
1157
  send "101313 35\n"
  extracting_expect "=101313 ($any_time)" user_active_3 1
1158
1159
1160
1161
1162
1163
while {"$user_active_3" == "$user_active_2"} {
    sleep 0.1
    send "999 35\n"
    extracting_expect "=999 ($any_time)" user_active_3 1
}

1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
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
1184

1185
# This test is timing sensitive.  It will fail if the server is extremely slow.
1186
1187
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
1188
1189

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

# test call 85 (get-collate-table)
1194
1195
send "1324 85\n"
unanchored_expect "^MRK:client1: =1324 256H" "collate-table start"
1196
unanchored_expect "$nl" "get-collate-table newline before digits"
1197
1198
1199
# 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.
1200
unanchored_expect "0123456789" "collate digits"
Per Cederqvist's avatar
Per Cederqvist committed
1201
unanchored_expect "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "collate upper"
1202
unanchored_expect "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "collate lower"
Per Cederqvist's avatar
Per Cederqvist committed
1203
1204
unanchored_expect "\377$nl" "collate end"

Per Cederqvist's avatar
Per Cederqvist committed
1205
# test call 86 (create-text)
1206
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
1207
1208
1209
1210
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"] }"
1211
simple_expect "=1325 9"
Per Cederqvist's avatar
Per Cederqvist committed
1212
1213
1214
1215
1216
1217

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)
1218
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
1219
1220
1221
1222
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"] }"
1223
simple_expect "=1326 10"
Per Cederqvist's avatar
Per Cederqvist committed
1224
1225
1226
1227
1228
1229

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)
1230
1231
1232
1233
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
1234
1235

# test call 89 (create-person)
1236
1237
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
1238
1239

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

Per Cederqvist's avatar
Per Cederqvist committed
1244
# test call 91 (get-conf-stat)
1245
1246
1247
1248
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"] }"
1249
1250
1251
1252

# test call 92 (modify-text-info)

# Add a short notice.
1253
1254
1255
send "1333 92 3 0 { } 1 { 2 00000000 1 [holl "Du har fel"] }\n"
simple_expect "=1333"
send "1334 90 3\n"
1256
# This text is marked twice: user area of person 6, presentation for 7.
1257
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"] }"
1258
1259

# Remove it.
1260
send "1335 92 3 1 { 2 } 0 { }\n"
1261
1262
simple_expect "=1335"
send "1336 90 3\n"
1263
# This text is marked twice: user area of person 6, presentation for 7.
1264
simple_expect "=1336 $time_3 6 0 16 2 2 { 0 7 6 3 } 1 { 1 28 8 $any_time 00001000 0 [holl "8"] }"
1265
1266

# Add a couple of more comments
1267
1268
1269
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"
1270
# This text is marked twice: user area of person 6, presentation for 7.
1271
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"] }"
1272
1273

# test call 93 (modify-conf-info)
1274
send "1339 91 8\n"
1275
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 1 [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 "2 text/plain"] 9 30 8 $any_time 00000000 0 [holl "2 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
1276
send "1340 91 8\n"
1277
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 1 [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 "2 text/plain"] 9 30 8 $time_c_8 00000000 0 [holl "2 x-kom/basic"] 10 33 8 $any_time 00000000 1 [holl "0"] 11 14 8 $any_time 00000000 1 [holl "3"] }"
1278

1279
1280
1281
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"
1282
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 1 [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 "2 text/plain"] 9 30 8 $time_c_8 00000000 0 [holl "2 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"] }"
1283
1284

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

Per Cederqvist's avatar
Per Cederqvist committed
1288
1289
# test call 95 (modify-system-info)
talk_to client 2