03.exp 20 KB
Newer Older
1
# Check that all functions do the right thing in their most normal use.
2 3 4
#
# The following objects are created in this test case:
#   Conferences
Per Cederqvist's avatar
Per Cederqvist committed
5
#    7 "(So called) Christian Music", later "PRIMa musik"
Per Cederqvist's avatar
Per Cederqvist committed
6
#    9 "Temporary Sancturay"
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#   Persons
#    6 "Per Cederqvist"
#         Member of 7.
#    8 "Kelly Talisman" (all available aux-infos are set)
#         Member of 7.
#   Texts
#    1 "Old-style text 1"    0 7 6 1
#    2 "Old-style text 2"    0 7 6 2
#    3 "Old-style text 3"    0 7 6 3
#    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
#   Sessions
#    0 logged in as person 6; default asyncs; does not use user_active
#      or set_client_version or any other new and fancy stuff.
#    1 logged in as person 8; all available asyncs; uses user_active;
#      calls set_client_version("dgt03", "sc 1").
Per Cederqvist's avatar
Per Cederqvist committed
25 26
#    2 logged in as person 8 for brief moments.  Mostly not logged in.
#      Default asyncs; does not us user_active or set_client_version.
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
read_versions

lyskomd_start

# 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 \\* \\*"

# This test was written while listening to Talitha, so it seemd proper
# 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"
simple_expect ":16 0 1 $any_time 6 0 16 0 2 { 0 7 6 1 }"
simple_expect "=1006 1"

68
send "1007 28 [holl "Old-style text 2"] 2 { 0 7 6 99 }\n"
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
simple_expect ":16 0 2 $any_time 6 0 16 0 2 { 0 7 6 2 }"
simple_expect "=1007 2"

send "1008 28 [holl "Old-style text 3"] 1 { 0 7 }\n"
simple_expect ":16 0 3 $any_time 6 0 16 0 2 { 0 7 6 3 }"
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"

86 87 88
# 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.
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 129 130 131 132 133 134 135 136
send "1010 96\n"
simple_expect "=1010 15 { 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 }"

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

send "1012 81\n"
simple_expect "=1012 8 { 0 5 7 8 9 11 12 13 }"

send "1013 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 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"
simple_expect "%1013 46 0"

send "1014 81\n"
simple_expect "=1014 8 { 0 5 7 8 9 11 12 13 }"

send "1015 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 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"
simple_expect "%1015 50 1"

send "1016 81\n"
simple_expect "=1016 11 { 0 5 6 7 8 9 11 12 13 14 15 }"

send "1017 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 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"
simple_expect "%1017 50 2"

send "1018 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 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"
simple_expect "%1018 50 3"

send "1019 81\n"
simple_expect "=1019 11 { 0 5 6 7 8 9 11 12 13 14 15 }"

send "1020 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 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"
simple_expect "%1020 50 4"

send "1021 81\n"
simple_expect "=1021 11 { 0 5 6 7 8 9 11 12 13 14 15 }"

send "1022 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 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"
simple_expect "%1022 50 128"

send "1023 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 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"
simple_expect "%1023 50 16"

send "1024 81\n"
simple_expect "=1024 11 { 0 5 6 7 8 9 11 12 13 14 15 }"

send "1025 80 12 { 0 5 6 7 8 9 10 11 12 13 14 15 }\n"
simple_expect "%1025 50 10"

137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
send "1026 80 11 { 0 5 6 7 8 9 11 12 13 14 15 }\n"
simple_expect "=1026"

send "1027 81\n"
simple_expect "=1027 11 { 0 5 6 7 8 9 11 12 13 14 15 }"

send "1028 89 [holl "Kelly Talisman"] [holl "the stars"] 7 { 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 [holl "Air"] 12 00000000 0 [holl "PGP public key"] 13 00000000 0 [holl "kelly@hotbox.com"] }\n"
simple_expect ":2 9 8 2"
simple_expect "=1028 8"
talk_to client 0
simple_expect ":2 9 8 2"
talk_to client 1

send "1029 86 [holl "New-style text 4"] 2 { 0 7 15 6 } 0 { }\n"
# No async message; person 8 isn't a member of the conferences this
# text goes to.
simple_expect "=1029 4"

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.
send "1030 100 7 8 100 0 00000000\n"
simple_expect "=1030"

send "1031 86 [holl "New-style text 5"] 2 { 0 7 15 6 } 0 { }\n"
simple_expect ":16 0 5 $any_time 8 0 16 0 2 { 0 7 6 5 }"
simple_expect ":18 15 5 $any_time 8 0 16 0 2 { 0 7 6 5 } 0 \\*"
simple_expect "=1031 5"
167

168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
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

send "1032 86 [holl "New-style text 6"] 2 { 0 7 15 8 } 0 { }\n"
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 \\*"
simple_expect "=1032 6"

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

send "1033 86 [holl "New-style text 7"] 2 { 0 1 15 8 } 0 { }\n"
simple_expect ":16 0 7 $any_time 8 0 16 0 4 { 0 1 6 1 1 8 6 2 }"
simple_expect ":18 15 7 $any_time 8 0 16 0 4 { 0 1 6 1 15 8 6 2 } 0 \\*"
simple_expect "=1033 7"

talk_to client 0
# No async for client 0 at this point.
send "1034 35\n"
simple_expect "=1034 $any_time"
talk_to client 1
191

Per Cederqvist's avatar
Per Cederqvist committed
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
# test call 0 (login)
client_start 2
talk_to client 2
send "A[holl "Foo"]\n"
simple_expect "LysKOM" "client 2 connected"
send "1035 0 3 [holl "gazonk"]\n"
simple_expect "%1035 10 3"
send "1036 0 8 [holl "gazonk"]\n"
simple_expect "%1036 4 8"
talk_to client 0
send "1037 35\n"
simple_expect "=1037 $any_time"
talk_to client 1
send "1038 35\n"
simple_expect "=1038 $any_time"
talk_to client 2
send "1039 0 8 [holl "the stars"]\n"
simple_expect ":2 9 8 3"
simple_expect "=1039"
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
send "1040 1\n"
simple_expect ":2 13 8 3"
simple_expect "=1040"
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
send "1041 2 2\n"
simple_expect "%1041 13 2"
send "1042 2 34\n"
simple_expect "%1042 9 34"
# This session has already changed conference to 7 in the preamble above.
# Check that the failed attempts didn't change that.
send "1043 83 1 0 0\n"
simple_expect "=1043 2 { 2 8 0 $any_num 01000000 0H 1 6 7 $any_num 00000000 0H }"
# Check that we can leave all conferences.
send "1044 2 0\n"
simple_expect "=1044"
talk_to client 1
simple_expect ":5 6 6 0 1 [holl ""] [holl "ceder@gratia@localhost"]"
talk_to client 0
send "1045 83 1 0 0\n"
simple_expect "=1045 2 { 2 8 0 $any_num 01000000 0H 1 6 0 $any_num 00000000 0H }"
# Go to the letterbox and stay there
send "1046 2 6\n"
simple_expect "=1046"
talk_to client 1
simple_expect ":5 6 6 6 1 [holl ""] [holl "ceder@gratia@localhost"]"
talk_to client 0
send "1047 83 1 0 0\n"
simple_expect "=1047 2 { 2 8 0 $any_num 01000000 0H 1 6 6 $any_num 00000000 0H }"

# test call 3 (change-name)
talk_to client 0
send "1048 3 7 [holl "Per Cederqvist"]\n"
simple_expect "%1048 20 0"
send "1049 3 7 [holl "PRIMa musik"]\n"
simple_expect ":3 5 7 [holl ".So called. Christian Music"] [holl "PRIMa musik"]"
simple_expect "=1049"

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
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307
# test call 4 (change-what-i-am-doing)
talk_to client 0
send "1050 4 [holl "Running a test suite"]\n"
simple_expect "=1050"
talk_to client 1
simple_expect ":5 6 6 6 1 [holl "Running a test suite"] [holl "ceder@gratia@localhost"]"
send "1051 4 [holl "Accepting i-am-on"]\n"
simple_expect ":5 6 8 0 2 [holl "Accepting i-am-on"] [holl "ic@gratia@localhost"]"
simple_expect "=1051"

# call 5 (create-person-old) is tested above.
# test call 6 (get-person-stat-old)
send "1052 6 0 0\n"
simple_expect "%1052 8 0"
send "1053 6 3 0\n"
simple_expect "%1053 10 3"
send "1054 6 10 0\n"
simple_expect "%1054 10 10"
send "1055 6 6 0\n"
simple_expect "=1055 [holl ""] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
send "1056 6 6 1\n"
simple_expect "=1056 [holl "ceder@gratia.unknown.@localhost"] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
send "1057 6 6 2\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 3\n"
simple_expect "=1058 [holl "ceder@gratia.unknown.@localhost"] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"
send "1059 6 6 32770\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 32771\n"
simple_expect "=1060 [holl "ceder@gratia.unknown.@localhost"] 0000010000000000 00000000 $any_time 0 0 1 0 48 0 0 0 1 1 3 0 2"

# test call 7 (set-priv-bits)
send "1061 7 8 0000000000000000\n"
simple_expect "%1061 12 0"
talk_to client 2
send "1062 62 5 [holl "gazonk"] 1\n"
simple_expect "=1062"
send "1063 7 8 0000000000000000\n"
simple_expect "%1063 12 0"
send "1064 42 255\n"
simple_expect "=1064"
send "1065 6 8 0\n"
Per Cederqvist's avatar
Per Cederqvist committed
308
simple_expect "=1065 [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
309 310 311
send "1066 7 8 0000000000000000\n"
simple_expect "=1066"
send "1067 6 8 0\n"
Per Cederqvist's avatar
Per Cederqvist committed
312
simple_expect "=1067 [holl ""] 0000000000000000 00000000 $any_time 0 $any_num 2 0 64 0 0 0 0 1 4 0 2"
Per Cederqvist's avatar
Per Cederqvist committed
313 314 315
send "1068 7 8 1111111111111111\n"
simple_expect "=1068"
send "1069 6 8 0\n"
Per Cederqvist's avatar
Per Cederqvist committed
316
simple_expect "=1069 [holl ""] 1111111111111111 00000000 $any_time 0 $any_num 2 0 64 0 0 0 0 1 4 0 2"
Per Cederqvist's avatar
Per Cederqvist committed
317 318 319
send "1070 7 8 0000010000000000\n"
simple_expect "=1070"
send "1071 6 8 0\n"
Per Cederqvist's avatar
Per Cederqvist committed
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491
simple_expect "=1071 [holl ""] 0000010000000000 00000000 $any_time 0 $any_num 2 0 64 0 0 0 0 1 4 0 2"

# test call 8 (set-passwd)
send "1072 8 5 [holl "foo"] [holl "bar"]\n"
simple_expect "%1072 4 5"
send "1073 8 5 [holl "gazonk"] [holl "bar"]\n"
simple_expect "=1073"
send "1074 1\n"
simple_expect "=1074"
send "1075 62 5 [holl "gazonk"] 1\n"
simple_expect "%1075 4 5"
send "1076 62 5 [holl "bar"] 1\n"
simple_expect "=1076"

# test call 9 (query-read-texts-old)
talk_to client 0
send "1077 9 6 7\n"
simple_expect "=1077 $any_time 7 100 0 0 \\*"

# test call 10 (create-conf-old)
send "1078 78 9\n"
simple_expect "%1078 9 9"
send "1079 10 [holl "Temporary Sanctuary"] 1010\n"
simple_expect "=1079 9"
send "1080 78 9\n"
simple_expect "=1080 [holl "Temporary Sanctuary"] 10100000 0 77"

# test call 11 (delete-conf)
send "1081 11 9\n"
simple_expect "=1081"
send "1082 78 9\n"
simple_expect "%1082 9 9"

# test call 12 (lookup-name)
send "1083 12 [holl "p"]\n"
simple_expect "=1083 4 { 1 2 6 7 } { 0000 0000 1001 0000 }"
send "1084 12 [holl "p c"]\n"
simple_expect "=1084 1 { 6 } { 1001 }"
send "1085 12 [holl "xyzzy"]\n"
simple_expect "=1085 0 \\* \\*"

# test call 13 (get-conf-stat-older)
send "1086 13 3 0\n"
simple_expect "=1086 [holl ""] 0000 $any_time $any_time 0 0 0 0 0 0 77 0 1 0"
send "1087 13 3 1\n"
simple_expect "=1087 [holl "Lappar .p. drren"] 0000 $any_time $any_time 0 0 0 0 0 0 77 0 1 0"

# test call 14 (add-member-old)
send "1088 14 3 6 90 2\n"
simple_expect "=1088"
send "1089 13 3 1\n"
simple_expect "=1089 [holl "Lappar .p. drren"] 0000 $any_time $any_time 0 0 0 0 0 0 77 1 1 0"

# test call 15 (sub-member)
send "1090 15 3 6\n"
simple_expect ":1 8 3"
simple_expect "=1090"
send "1091 15 3 6\n"
simple_expect "%1091 13 3"

# test call 16 (set-presentation)
send "1092 16 7 3\n"
simple_expect "=1092"
# We check the result under call 50 below.

# test call 17 (set-etc-motd)
send "1093 17 7 2\n"
simple_expect "=1093"
# We check the result under call 50 below.

# test call 18 (set-supervisor)
send "1094 18 7 7\n"
simple_expect "=1094"
# We check the result under call 50 below.

# test call 19 (set-permitted-submitters)
send "1095 19 7 8\n"
simple_expect "=1095"
# We check the result under call 50 below.

# test call 20 (set-super-conf)
send "1096 20 7 4\n"
simple_expect "=1096"
# We check the result under call 50 below.

# test call 21 (set-conf-type)
send "1097 21 7 0100\n"
simple_expect "=1097"
send "1098 21 7 01001000\n"
simple_expect "=1098"
# We check the result under call 50 below.

# test call 22 (set-garb-nice)
send "1099 22 7 144\n"
simple_expect "=1099"
# We check the result under call 50 below.

# test call 23 (get-marks) and call 24 (mark-text-old)
send "1100 24 2 15\n"
simple_expect "=1100"
send "1101 23\n"
simple_expect "=1101 1 { 2 15 }"
send "1102 24 2 28\n"
simple_expect "=1102"
send "1103 23\n"
simple_expect "=1103 1 { 2 28 }"
send "1104 24 3 9\n"
simple_expect "=1104"
send "1105 23\n"
simple_expect "=1105 2 { 2 28 3 9 }"
send "1106 24 2 0\n"
simple_expect "=1106"
send "1107 23\n"
simple_expect "=1107 1 { 3 9 }"
send "1108 24 3 0\n"
simple_expect "=1108"
send "1109 23\n"
simple_expect "=1109 0 \\*"

# call 25 is tested extensively in 02.exp

# test call 26 (get-text-stat-old)
send "1110 26 1\n"
simple_expect "=1110 $any_time 6 0 16 0 2 { 0 7 6 1 }"

# test call 27 (mark-as-read)
send "1111 9 6 7\n"
simple_expect "=1111 $any_time 7 100 0 0 \\*"

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

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

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

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

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

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

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

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

# FIXME: test call 27 more (sequential, other orders, more than a
# single argument at the same time).

492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513
# FIXME: test call 28
# FIXME: test call 29
# FIXME: test call 30
# FIXME: test call 31
# FIXME: test call 32
# FIXME: test call 33
# FIXME: test call 34
# FIXME: test call 35
# FIXME: test call 36
# FIXME: test call 37
# FIXME: test call 38
# FIXME: test call 39
# FIXME: test call 40
# FIXME: test call 41
# FIXME: test call 42
# FIXME: test call 43
# FIXME: test call 44
# FIXME: test call 45
# FIXME: test call 46
# FIXME: test call 47
# FIXME: test call 48
# FIXME: test call 49
Per Cederqvist's avatar
Per Cederqvist committed
514 515 516
# test call 50 (get-conf-stat-old)
send "1128 50 7\n"
simple_expect "=1128 [holl "PRIMa musik"] 0100 $any_time $any_time 6 3 7 8 4 2 144 2 1 6"
517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
# FIXME: test call 51
# FIXME: test call 52
# FIXME: test call 53
# FIXME: test call 54
# FIXME: test call 55
# FIXME: test call 56
# FIXME: test call 57
# FIXME: test call 58
# FIXME: test call 59
# FIXME: test call 60
# FIXME: test call 61
# FIXME: test call 62
# FIXME: test call 63
# FIXME: test call 64
# FIXME: test call 65
# FIXME: test call 66
# FIXME: test call 67
# FIXME: test call 68
# FIXME: test call 69
# FIXME: test call 70
# FIXME: test call 71
# FIXME: test call 72
# FIXME: test call 73
# FIXME: test call 74
# FIXME: test call 75
# FIXME: test call 76
# FIXME: test call 77
Per Cederqvist's avatar
Per Cederqvist committed
544 545 546 547
# test call 78 (get-uconf-stat)
send "1129 78 7\n"
simple_expect "=1129 [holl "PRIMa musik"] 01001000 6 144"

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
# FIXME: test call 79
# call 80 is tested during startup of client 1.
# call 81 is tested during startup of client 1.
# FIXME: test call 82
# FIXME: test call 83
# FIXME: test call 84
# FIXME: test call 85
# FIXME: test call 86
# FIXME: test call 87
# FIXME: test call 88
# FIXME: test call 89
# FIXME: test call 90
# FIXME: test call 91
# FIXME: test call 92
# FIXME: test call 93
# FIXME: test call 94
# FIXME: test call 95
# FIXME: test call 96
# FIXME: test call 97
# FIXME: test call 98
# FIXME: test call 99
# FIXME: test call 100
# FIXME: test call 101
# FIXME: test call 102
# FIXME: test call 103
# FIXME: test call 104

# There is no call 105--yet.
Per Cederqvist's avatar
Per Cederqvist committed
576 577
send "1130 105\n"
simple_expect "%1130 2 0"
578 579

# There is no call 106--yet.
Per Cederqvist's avatar
Per Cederqvist committed
580 581
send "1131 106\n"
simple_expect "%1131 2 0"
582 583

# There is no call 107--yet.
Per Cederqvist's avatar
Per Cederqvist committed
584 585
send "1132 107\n"
simple_expect "%1132 2 0"
586 587

# There is no call 108--yet.
Per Cederqvist's avatar
Per Cederqvist committed
588 589
send "1133 108\n"
simple_expect "%1133 2 0"
590 591

# There is no call 109--yet.
Per Cederqvist's avatar
Per Cederqvist committed
592 593
send "1134 109\n"
simple_expect "%1134 2 0"
594 595

# There is no call 110--yet.
Per Cederqvist's avatar
Per Cederqvist committed
596 597
send "1135 110\n"
simple_expect "%1135 2 0"
598

599
talk_to client 1
Per Cederqvist's avatar
Per Cederqvist committed
600 601
send "1136 55 2\n"
simple_expect "=1136"
602 603
simple_expect ":2 13 8 2"
client_death 1
604 605 606

# Shut everything down
talk_to client 0
607
simple_expect ":2 13 8 2"
608

Per Cederqvist's avatar
Per Cederqvist committed
609
send "1137 62 5 [holl "bar"] 0\n"
610 611
simple_expect ":2 13 6 1"
simple_expect ":2 9 5 1"
Per Cederqvist's avatar
Per Cederqvist committed
612
simple_expect "=1137"
613

Per Cederqvist's avatar
Per Cederqvist committed
614 615 616 617
send "1138 42 255\n"
simple_expect "=1138" "42=enable succeeded"
send "1139 44 0\n"
simple_expect "=1139" "44=shutdown-kom succeeded"
618 619
simple_expect ":2 13 5 1"
client_death 0
Per Cederqvist's avatar
Per Cederqvist committed
620 621 622 623
# FIXME: There are enqueued logout/disconnect messages to this client.
# Don't fix that now; we probably will disconnect this client before
# this time anyhow.
client_death 2
624
lyskomd_death