01.exp 15.3 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
1
# Test suite for lyskomd.
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
26
27
28
# Check that all functions do the right thing when invoked before the
# user logs in.

read_versions
29

Per Cederqvist's avatar
Per Cederqvist committed
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
lyskomd_start

client_start 0
talk_to client 0
send "A\n"
send "[holl "DejaGnu test suite"]\n"
simple_expect "LysKOM" "connected"

send "1000 62 5 [holl "bogus"] 0\n"
simple_expect "%1000 4 5"

send "1001 62 4 [holl "nono"] 0\n"
simple_expect "%1001 10 4"

send "1002 62 6 [holl "nono"] 0\n"
simple_expect "%1002 10 6"

send "1003 62 60 [holl "nono"] 0\n"
simple_expect "%1003 10 60"

send "1004 62 0 [holl "zero"] 0\n"
simple_expect "%1004 8 0"

# Turn of async messages
send "1005 80 0 { }\n"
simple_expect "=1005"

# Test that most calls fail when the user isn't logged in.

# 0:login-old may succeed
# 1:logout always succeeds
send "1006 1\n"
David Byers's avatar
David Byers committed
62
simple_expect "=1006" "logout"
Per Cederqvist's avatar
Per Cederqvist committed
63
64
# 2:change-conference
send "1007 2 4\n"
David Byers's avatar
David Byers committed
65
simple_expect "%1007 6 0" "change-conference"
Per Cederqvist's avatar
Per Cederqvist committed
66
67
# 3:change-name
send "1008 3 1 [holl "new name"]\n"
David Byers's avatar
David Byers committed
68
simple_expect "%1008 6 0" "change-name"
Per Cederqvist's avatar
Per Cederqvist committed
69
70
# 4:change-what-i-am-doing
send "1009 4 [holl "testing lyskomd"]\n"
David Byers's avatar
David Byers committed
71
simple_expect "=1009" "change-what-i-am-doing"
Per Cederqvist's avatar
Per Cederqvist committed
72
73
# 5:create-person-old
send "1010 5 [holl "new person"] [holl "mypasswd"]\n"
David Byers's avatar
David Byers committed
74
simple_expect "=1010 6" "create-person-old"
75
send "1011 39\n"
David Byers's avatar
David Byers committed
76
simple_expect "=1011 1 { 6 0 [holl ""] }" "create-person-old"
77
send "1012 1\n"
David Byers's avatar
David Byers committed
78
simple_expect "=1012" "create-person-old"
Per Cederqvist's avatar
Per Cederqvist committed
79
# 6:get-person-stat-old
80
send "1013 6 6 1\n"
David Byers's avatar
David Byers committed
81
simple_expect "%1013 6 0" "get-person-stat-old"
82
83
# 7:set-priv-bits
send "1014 7 6 0000000000000000\n"
David Byers's avatar
David Byers committed
84
simple_expect "%1014 6 0" "set-priv-bits"
85
86
# 8:set-passwd
send "1015 8 5 [holl "old"] [holl "new"]\n"
David Byers's avatar
David Byers committed
87
simple_expect "%1015 6 0" "set-passwd"
Per Cederqvist's avatar
Per Cederqvist committed
88
# 9:query-read-texts-old
89
send "1016 9 6 6\n"
David Byers's avatar
David Byers committed
90
simple_expect "=1016 $any_time 6 255 0 0 \\*" "query-read-texts-old"
Per Cederqvist's avatar
Per Cederqvist committed
91
# 10:create-conf-old
David Byers's avatar
David Byers committed
92
93
send "1017 10 [holl "no way"] 0000\n" 
simple_expect "%1017 6 0" "create-conf-old"
94
95
# 11:delete-conf
send "1018 11 1\n"
David Byers's avatar
David Byers committed
96
simple_expect "%1018 6 0" "delete-conf"
Per Cederqvist's avatar
Per Cederqvist committed
97
# 12:lookup-name
98
send "1019 12 [holl "pres"]\n"
David Byers's avatar
David Byers committed
99
simple_expect "=1019 2 { 1 2 } { 0000 0000 }" "lookup-name"
100
send "1020 12 [holl "xyzzy does not exist"]\n"
David Byers's avatar
David Byers committed
101
simple_expect "=1020 0 \\* \\*" "lookup-name"
Per Cederqvist's avatar
Per Cederqvist committed
102
# 13:get-conf-stat-older
103
send "1021 13 1 0\n"
David Byers's avatar
David Byers committed
104
simple_expect "=1021 0H 0000 $any_time $any_time 0 0 0 0 0 0 77 0 1 0" "get-conf-stat-older"
105
send "1022 13 1 1\n"
David Byers's avatar
David Byers committed
106
simple_expect "=1022 [holl "Presentation .av nya. mten"] 0000 $any_time $any_time 0 0 0 0 0 0 77 0 1 0" "get-conf-stat-older"
Per Cederqvist's avatar
Per Cederqvist committed
107
# 14:add-member-old
108
send "1023 14 4 5 255 1\n"
David Byers's avatar
David Byers committed
109
simple_expect "%1023 6 0" "add-member-old"
110
111
# 15:sub-member
send "1024 15 4 5\n"
David Byers's avatar
David Byers committed
112
simple_expect "%1024 6 0" "sub-member"
113
114
# 16:set-presentation
send "1025 16 4 1\n"
David Byers's avatar
David Byers committed
115
simple_expect "%1025 6 0" "set-presentation"
116
117
# 17:set-etc-motd
send "1026 17 4 1\n"
David Byers's avatar
David Byers committed
118
simple_expect "%1026 6 0" "set-etc-motd"
119
120
# 18:set-supervisor
send "1027 18 4 1\n"
David Byers's avatar
David Byers committed
121
simple_expect "%1027 6 0" "set-supervisor"
122
123
# 19:set-permitted-submitters
send "1028 19 4 1\n"
David Byers's avatar
David Byers committed
124
simple_expect "%1028 6 0" "set-permitted-submitters"
125
126
# 20:set-super-conf
send "1029 20 4 1\n"
David Byers's avatar
David Byers committed
127
simple_expect "%1029 6 0" "set-super-conf"
128
129
# 21:set-conf-type
send "1030 21 4 0000\n"
David Byers's avatar
David Byers committed
130
simple_expect "%1030 6 0" "set-conf-type"
131
send "1031 21 4 00000000\n"
David Byers's avatar
David Byers committed
132
simple_expect "%1031 6 0" "set-conf-type"
133
134
# 22:set-garb-nice
send "1032 22 4 17\n"
David Byers's avatar
David Byers committed
135
simple_expect "%1032 6 0" "set-garb-nice"
136
137
# 23:get-marks
send "1033 23\n"
David Byers's avatar
David Byers committed
138
simple_expect "%1033 6 0" "get-marks"
139
140
# 24:mark-text-old
send "1034 24 1 243\n"
David Byers's avatar
David Byers committed
141
simple_expect "%1034 6 0" "mark-text-old"
Per Cederqvist's avatar
Per Cederqvist committed
142
# 25:get-text
143
send "1035 25 1 0 999\n"
David Byers's avatar
David Byers committed
144
simple_expect "%1035 14 1" "get-text"
145
146
# 26:get-text-stat-old
send "1036 26 1\n"
David Byers's avatar
David Byers committed
147
simple_expect "%1036 14 1" "get-text-stat-old"
Per Cederqvist's avatar
Per Cederqvist committed
148
# 27:mark-as-read
149
send "1037 27 3 1 { 1 }\n"
David Byers's avatar
David Byers committed
150
simple_expect "%1037 6 0" "mark-as-read"
151
152
# 28:create-text-old
send "1038 28 [holl "A sample text"] 1 { 0 2 }\n"
David Byers's avatar
David Byers committed
153
simple_expect "%1038 6 0" "create-text-old"
154
155
# 29:delete-text
send "1039 29 1\n"
David Byers's avatar
David Byers committed
156
simple_expect "%1039 6 0" "delete-text"
157
158
# 30:add-recipient
send "1040 30 1 4 0\n"
David Byers's avatar
David Byers committed
159
simple_expect "%1040 6 0" "add-recipient"
160
161
# 31:sub-recipient
send "1041 31 1 4\n"
David Byers's avatar
David Byers committed
162
simple_expect "%1041 6 0" "sub-recipient"
163
164
# 32:add-comment
send "1042 32 2 1\n"
David Byers's avatar
David Byers committed
165
simple_expect "%1042 6 0" "add-comment"
166
167
# 33:sub-comment
send "1043 33 2 1\n"
David Byers's avatar
David Byers committed
168
simple_expect "%1043 6 0" "sub-comment"
169
170
# 34:get-map
send "1044 34 1 0 99\n"
David Byers's avatar
David Byers committed
171
simple_expect "%1044 6 0" "get-map"
172
# 35:get-time
173
send "1045 35\n"
David Byers's avatar
David Byers committed
174
simple_expect "=1045 $any_time" "get-time"
175
# 36:get-info-old
176
send "1046 36\n"
David Byers's avatar
David Byers committed
177
simple_expect "=1046 $server_compat_version 1 2 3 4 0" "get-info-old"
178
# 37:add-footnote
179
send "1047 37 1 2\n"
David Byers's avatar
David Byers committed
180
simple_expect "%1047 6 0" "add-footnote"
181
182
# 38:sub-footnote
send "1048 38 1 2\n"
David Byers's avatar
David Byers committed
183
simple_expect "%1048 6 0" "sub-footnote"
184
# 39:who-is-on-old
185
send "1049 39\n"
David Byers's avatar
David Byers committed
186
simple_expect "=1049 0 \\*" "who-is-on-old"
187
# 40:set-unread
188
send "1050 40 1 3\n"
David Byers's avatar
David Byers committed
189
simple_expect "%1050 6 0" "set-unread"
190
191
# 41:set-motd-of-lyskom
send "1051 41 1\n"
David Byers's avatar
David Byers committed
192
simple_expect "%1051 6 0" "set-motd-of-lyskom"
193
194
# 42:enable
send "1052 42 255\n"
David Byers's avatar
David Byers committed
195
simple_expect "%1052 6 0" "enable"
196
197
# 43:sync-kom
send "1053 43\n"
David Byers's avatar
David Byers committed
198
simple_expect "%1053 6 0" "sync-kom"
199
200
# 44:shutdown-kom
send "1054 44 2\n"
David Byers's avatar
David Byers committed
201
simple_expect "%1054 6 0" "shutdown-kom"
202
203
# 45:broadcast
send "1055 45 [holl "broadcast-message"]\n"
David Byers's avatar
David Byers committed
204
simple_expect "%1055 6 0" "broadcast"
205
206
# 46:get-membership-old
send "1056 46 5 1 3 1\n"
David Byers's avatar
David Byers committed
207
simple_expect "%1056 6 0" "get-membership-old"
208
209
# 47:get-created-texts
send "1057 47 5 1 3\n"
David Byers's avatar
David Byers committed
210
simple_expect "%1057 6 0" "get-created-text"
211
# 48:get-members-old
212
send "1058 48 5 0 1\n"
David Byers's avatar
David Byers committed
213
simple_expect "=1058 1 { 5 }" "get-members-old"
214
send "1059 48 5 0 2\n"
David Byers's avatar
David Byers committed
215
simple_expect "=1059 1 { 5 }" "get-members-old"
216
send "1060 48 5 0 10\n"
David Byers's avatar
David Byers committed
217
simple_expect "=1060 1 { 5 }" "get-members-old"
218
send "1061 49 5\n"
David Byers's avatar
David Byers committed
219
simple_expect "=1061 [holl "X.unknown.@localhost"] 1111111111111111 00000000 $any_time 0 482 4 0 0 0 0 0 0 1 0 0 1" "get-members-old"
220
221
# 50:get-conf-stat-old
send "1062 50 1\n"
David Byers's avatar
David Byers committed
222
simple_expect "=1062 [holl "Presentation .av nya. mten"] 0000 $any_time $any_time 0 0 0 0 0 0 77 0 1 0" "get-conf-stat-old"
223
224
# 51:who-is-on
send "1063 51\n"
David Byers's avatar
David Byers committed
225
simple_expect "=1063 0 \\*" "who-is-on"
226
227
# 52:get-unread-confs
send "1064 52 5\n"
David Byers's avatar
David Byers committed
228
simple_expect "%1064 6 0" "get-unread-confs"
229
230
# 53:send-message
send "1065 53 1 [holl "holler"]\n"
David Byers's avatar
David Byers committed
231
simple_expect "%1065 6 0" "send-message"
232
233
# 54:get-session-info
send "1066 54 1\n"
David Byers's avatar
David Byers committed
234
simple_expect "%1066 6 0" "get-session-info"
235
236
# 55:disconnect
send "1067 55 2\n"
David Byers's avatar
David Byers committed
237
simple_expect "%1067 6 0" "disconnect"
238
239
# 56:who-am-i
send "1068 56\n"
David Byers's avatar
David Byers committed
240
simple_expect "=1068 1" "who-am-i"
241
242
# 57:set-user-area
send "1069 57 5 2\n"
David Byers's avatar
David Byers committed
243
simple_expect "%1069 6 0" "set-user-area"
244
245
# 58:get-last-text
send "1070 58 0 0 12 1 0 90 0 0 0\n"
246
simple_expect "%1070 6 0" "get-last-text"
247
248
# 59:create-anonymous-text-old
send "1071 59 [holl "anon-txt"] 1 { 0 2 }\n"
David Byers's avatar
David Byers committed
249
simple_expect "%1071 6 0" "create-anonymous-text-old"
250
251
# 60:find-next-text-no
send "1072 60 0\n"
252
simple_expect "%1072 6 0" "find-next-text-no"
253
send "1073 60 1\n"
254
simple_expect "%1073 6 0" "find-next-text-no"
255
send "1074 60 3\n"
256
simple_expect "%1074 6 0" "find-next-text-no"
257
258
# 61:find-previous-text-no
send "1075 61 18\n"
259
simple_expect "%1075 6 0" "find-previous-text-no"
260
261
# 62:login
send "1076 62 0 [holl "broken"] 1\n"
David Byers's avatar
David Byers committed
262
simple_expect "%1076 8 0" "login"
263
264
# 63:who-is-on-ident
send "1077 63\n"
David Byers's avatar
David Byers committed
265
simple_expect "=1077 0 \\*" "who-is-on-ident"
266
267
# 64:get-session-info-ident
send "1078 64 1\n"
David Byers's avatar
David Byers committed
268
simple_expect "%1078 6 0" "get-session-info-ident"
269
270
# 65:re-lookup-person
send "1079 65 [holl "."]\n"
David Byers's avatar
David Byers committed
271
simple_expect "=1079 2 { 5 6 }" "re-lookup-person"
272
273
# 66:re-lookup-conf
send "1080 66 [holl "Pre.*m.*"]\n"
David Byers's avatar
David Byers committed
274
simple_expect "=1080 2 { 1 2 }" "re-lookup-conf"
275
276
# 67:lookup-person
send "1081 67 [holl "ad"]\n"
David Byers's avatar
David Byers committed
277
simple_expect "=1081 1 { 5 }" "lookup-person"
278
279
# 68:lookup-conf
send "1082 68 [holl "n o lys"]\n"
David Byers's avatar
David Byers committed
280
simple_expect "=1082 1 { 4 }" "lookup-conf"
281
282
# 69:set-client-version
send "1083 69 [holl "DejaGnu"] [holl "1.3"]\n"
David Byers's avatar
David Byers committed
283
simple_expect "=1083" "set-client-version"
284
285
# 70:get-client-name
send "1084 70 1\n"
David Byers's avatar
David Byers committed
286
simple_expect "%1084 6 0" "get-client-name"
287
288
# 71:get-client-version
send "1085 71 1\n"
David Byers's avatar
David Byers committed
289
simple_expect "%1085 6 0" "get-clien-version"
290
291
# 72:mark-text
send "1086 72 1 239\n"
David Byers's avatar
David Byers committed
292
simple_expect "%1086 6 0" "mark-text"
293
294
# 73:unmark-text
send "1087 73 1\n"
David Byers's avatar
David Byers committed
295
simple_expect "%1087 6 0" "unmark-text"
296
297
# 74:re-z-lookup
send "1088 74 [holl "LysKOM"] 1 1\n"
David Byers's avatar
David Byers committed
298
simple_expect "=1088 2 { [holl "Nyheter om LysKOM"] 0000 4 [holl "Administratr .fr. LysKOM"] 1001 5 }" "re-z-lookup"
299
300
# 75:get-version-info
send "1089 75\n"
David Byers's avatar
David Byers committed
301
simple_expect "=1089 $protocol_a_level [holl "$server_software"] [holl "$server_version"]" "get-version-info"
302
303
# 76:lookup-z-name
send "1090 76 [holl "pre m"] 1 1\n"
David Byers's avatar
David Byers committed
304
simple_expect "=1090 2 { [holl "Presentation .av nya. mten"] 0000 1 [holl "Presentation .av nya. medlemmar"] 0000 2 }" "lookup-z-name"
305
306
# 77:set-last-read
send "1091 77 3 4\n"
David Byers's avatar
David Byers committed
307
simple_expect "%1091 6 0" "set-last-read"
308
309
# 78:get-uconf-stat
send "1092 78 3\n"
David Byers's avatar
David Byers committed
310
simple_expect "=1092 [holl "Lappar .p. drren"] 00001000 0 77" "get-uconf-stat"
311
312
# 79:set-info
send "1093 79 10901 1 2 3 4 1080\n"
David Byers's avatar
David Byers committed
313
simple_expect "%1093 6 0" "set-info"
314
315
# 80:accept-async
send "1094 80 0 { }\n"
David Byers's avatar
David Byers committed
316
simple_expect "=1094" "accept-async"
317
318
# 81:query-async
send "1095 81\n"
David Byers's avatar
David Byers committed
319
simple_expect "=1095 0 \\*" "query-async"
320
321
# 82:user-active
send "1096 82\n"
David Byers's avatar
David Byers committed
322
simple_expect "=1096" "user-active"
323
324
# 83:who-is-on-dynamic
send "1097 83 1 1 0\n"
David Byers's avatar
David Byers committed
325
simple_expect "=1097 1 { 1 0 0 $any_num 11000000 [holl ""] }" "who-is-on-dynamic"
326
327
# 84:get-static-session-info
send "1098 84 1\n"
David Byers's avatar
David Byers committed
328
simple_expect "%1098 6 0" "get-static-session-info"
329
330
# 85:get-collate-table
send "1099 85\n"
David Byers's avatar
David Byers committed
331
unanchored_expect "^MRK:client0: =1099 256H" "get-collate-table start"
332
unanchored_expect "$nl" "get-collate-table newline before digits"
333
334
335
# 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.
336
337
unanchored_expect "0123456789" "get-collate-table digits"
unanchored_expect "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "get-collate-table upper"
David Byers's avatar
David Byers committed
338
unanchored_expect "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "get-collate-table lower"
339
340
341
unanchored_expect "\377$nl" "collate end"
# 86:create-text
send "1100 86 [holl "some text"] 1 { 0 4 } 0 { }\n"
David Byers's avatar
David Byers committed
342
simple_expect "%1100 6 0" "create-text"
343
344
# 87:create-anonymous-text
send "1101 87 [holl "some text"] 1 { 0 4 } 0 { }\n"
David Byers's avatar
David Byers committed
345
simple_expect "%1101 6 0" "create-anonymous-text"
346
# 88:create-conf
David Byers's avatar
David Byers committed
347
348
send "1102 88 [holl "new conf"] 0000 0 { }\n" 
simple_expect "%1102 6 0" "create-conf"
349
send "1103 88 [holl "new conf"] 00000000 0 { }\n"
David Byers's avatar
David Byers committed
350
simple_expect "%1103 6 0" "create-conf"
351
# 89:create-person
David Byers's avatar
David Byers committed
352
send "1104 89 [holl "new 89 person"] [holl "89pwd"] 00000000 0 { }\n"
David Byers's avatar
David Byers committed
353
simple_expect "=1104 7" "create-person"
354
355
  send "101105 62 7 [holl "89pwd"] 0\n"
  simple_expect "=101105"
356
send "1105 83 1 1 0\n"
David Byers's avatar
David Byers committed
357
simple_expect "=1105 1 { 1 7 0 $any_num 01000000 [holl ""] }" "create-person"
358
send "1106 1\n"
David Byers's avatar
David Byers committed
359
simple_expect "=1106" "create-person"
360
send "1107 83 1 1 0\n"
David Byers's avatar
David Byers committed
361
simple_expect "=1107 1 { 1 0 0 $any_num 11000000 [holl ""] }" "create-person"
362
363
# 90:get-text-stat
send "1108 90 1\n"
David Byers's avatar
David Byers committed
364
simple_expect "%1108 14 1" "get-text-stat"
365
366
# 91:get-conf-stat
send "1109 91 1\n"
367
simple_expect "=1109 [holl "Presentation .av nya. mten"] 00001000 $any_time $any_time 0 0 0 0 0 0 77 77 0 1 0 0 0 \\*" "get-conf-stat"
368
369
# 92:modify-text-info
send "1110 92 1 0 { } 0 { }\n"
David Byers's avatar
David Byers committed
370
simple_expect "%1110 6 0" "modify-text-info"
371
372
# 93:modify-conf-info
send "1111 93 1 0 { } 0 { }\n"
David Byers's avatar
David Byers committed
373
simple_expect "%1111 6 0" "modify-conf-info"
374
375
# 94:get-info
send "1112 94\n"
David Byers's avatar
David Byers committed
376
simple_expect "=1112 $server_compat_version 1 2 3 4 0 0 \\*" "get-info"
377
378
# 95:modify-system-info
send "1113 95 0 { } 0 { }\n"
David Byers's avatar
David Byers committed
379
simple_expect "%1113 6 0" "modify-system-info"
380
381
# 96:query-predefined-aux-items
send "1114 96\n"
382
simple_expect "=1114 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 }" "query-predefined-aux-items"
383
384
# 97:set-expire
send "1115 97 1 76\n"
David Byers's avatar
David Byers committed
385
simple_expect "%1115 6 0" "set-expire"
386
# 98:query-read-texts-10
387
send "1116 98 6 6\n"
388
389
simple_expect "=1116 0 $any_time 6 255 0 0 \\* 6 $any_time 00000000" "query-read-texts-10"
# 99:get-membership-10
390
send "1117 99 6 0 10 1\n"
391
simple_expect "%1117 6 0" "get-membership-10"
392
393
# 100:add-member
send "1118 100 5 3 250 1 00000000\n"
David Byers's avatar
David Byers committed
394
simple_expect "%1118 6 0" "add-member"
395
396
# 101:get-members
send "1119 101 5 0 10\n"
David Byers's avatar
David Byers committed
397
simple_expect "=1119 1 { 5 5 $any_time 00000000 }" "get-members"
398
399
# 102:set-membership-type
send "1120 102 5 5 01000000\n"
David Byers's avatar
David Byers committed
400
simple_expect "%1120 6 0" "set-membership-type"
401
402
# 103:local-to-global
send "1121 103 1 1 20\n"
David Byers's avatar
David Byers committed
403
simple_expect "%1121 6 0" "local-to-global"
404
405
# 104:map_created_texts
send "1122 104 5 1 20\n"
David Byers's avatar
David Byers committed
406
simple_expect "%1122 6 0" "map-created-texts"
407
408
409
# 105:set-keep-commented
send "1123 105 1 99\n"
simple_expect "%1123 6 0" "set-keep-commented"
David Byers's avatar
David Byers committed
410
411
412
# 106:set-pers-flags
send "1124 106 5 10101010\n"
simple_expect "%1124 6 0" "set-pers-flags"
413
414
415
416
417
418
# 107:query-read-texts
send "1125 107 6 6 1 0\n"
simple_expect "=1125 0 $any_time 6 255 0 \\* 6 $any_time 00000000" "query-read-texts"
# 108:get-membership
send "1126 108 6 0 10 1 0\n"
simple_expect "%1126 6 0" "get-membership"
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# 109:mark-as-unread
send "1127 109 6 1\n"
simple_expect "%1127 6 0" "mark-as-unread"
# 110:set-read-ranges
send "1128 110 6 0 { }\n"
simple_expect "%1128 6 0" "mark-as-unread"
send "1129 110 6 1 { 1 2 }\n"
simple_expect "%1129 6 0" "mark-as-unread"
send "1130 110 6 2 { 1 1 3 3 }\n"
simple_expect "%1130 6 0" "mark-as-unread"
send "1131 110 6 1 { 3 1 }\n"
simple_expect "%1131 55 0" "mark-as-unread"
send "1132 110 6 2 { 1 3 3 3 }\n"
simple_expect "%1132 56 1" "mark-as-unread"
send "1133 110 6 2 { 0 1 3 3 }\n"
simple_expect "%1133 17 0" "mark-as-unread"
send "1134 110 6 2 { 1 1 3 2 }\n"
simple_expect "%1134 55 1" "mark-as-unread"
437

438
439
440
# 111:does not exist (change this when you add a call)
send "1135 111\n"
simple_expect "%1135 2 0"
441
# finally, check that 55=disconnect actually works without logging in.
442
443
send "1136 55 1\n"
simple_expect "=1136" "disconnect (no login)"
444
445
446
447
448
449
450
451
client_death 0

client_start 0
talk_to client 0
send "A\n"
send "[holl "DejaGnu test suite"]\n"
simple_expect "LysKOM" "connected"
# Turn of async messages
452
453
send "1137 80 0 { }\n"
simple_expect "=1137"
Per Cederqvist's avatar
Per Cederqvist committed
454
455

# Log in
456
457
send "1138 62 5 [holl "gazonk"] 0\n"
simple_expect "=1138"
Per Cederqvist's avatar
Per Cederqvist committed
458

459
460
send "1139 9 5 5\n"
simple_expect "=1139 $any_time 5 255 0 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
461

462
463
send "1140 27 5 0 { }\n"
simple_expect "=1140"
Per Cederqvist's avatar
Per Cederqvist committed
464

465
466
send "1141 9 5 5\n"
simple_expect "=1141 $any_time 5 255 0 0 \\*"
Per Cederqvist's avatar
Per Cederqvist committed
467

468
469
470
471
send "1142 6 6 1\n"
simple_expect "=1142 [idholl "DejaGnu test suite.unknown."] 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
send "1143 6 6 0\n"
simple_expect "=1143 0H 0000010000000000 00000000 $any_time 0 $any_num 1 0 0 0 0 0 0 1 0 0 1"
Per Cederqvist's avatar
Per Cederqvist committed
472
473
474

talk_to client 0

475
476
477
478
send "1144 42 255\n"
simple_expect "=1144" "42=enable succeeded"
send "1145 44 0\n"
simple_expect "=1145" "44=shutdown-kom succeeded"
Per Cederqvist's avatar
Per Cederqvist committed
479
480
client_death 0
lyskomd_death