diff --git a/src/server/testsuite/lyskomd.0/03.exp b/src/server/testsuite/lyskomd.0/03.exp index 2d3b4aa404d10d0befe6a435a4dd08355ce8c9d8..53d7348b0b04158ead36e11fbf08d6e86c452e06 100644 --- a/src/server/testsuite/lyskomd.0/03.exp +++ b/src/server/testsuite/lyskomd.0/03.exp @@ -55,7 +55,7 @@ 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 +# This test was written while listening to Talitha, so it seemed proper # to use her name as password. send "1001 5 [holl "Per Cederqvist"] [holl "Talitha"]\n" simple_expect ":2 9 6 1" @@ -634,7 +634,7 @@ simple_expect "=1169 $any_time 7 100 6 0 \\*" send "1170 58 $time_3\n" simple_expect "=1170 2" send "1171 98 6 7\n" -simple_expect "=1171 .*" +simple_expect "=1171 $any_time 7 100 6 0 \\* 6 $any_time 00000000" send "1172 29 2\n" # No new'n'fancy async message here. simple_expect "=1172" @@ -1224,10 +1224,47 @@ simple_expect "=1339 [holl "Kelly Talisman"] 10011000 $time_c_8 $time_7 8 0 8 0 send "1340 94\n" simple_expect "=1340 $server_compat_version 1 2 3 4 0 0 \\*" -# FIXME: test call 95 -# FIXME: test call 96 -# FIXME: test call 97 -# FIXME: test call 98 +# test call 95 (modify-system-info) +talk_to client 2 +send "1341 95 0 { } 2 { 9 00000000 1 [holl "compface must die"] 13 00000000 1 [holl "maint@kom"] }\n" +simple_expect "=1341" +# Attempt to set a nonexisting text as faq for the server. +# FIXME: this should fail, since there is no way we can ensure that +# the text is marked when text 999 is finally created. If this item +# is later removed an inconsistency may appear. +send "1342 95 0 { } 1 { 14 00000000 1 [holl "999"] }\n" +simple_expect "=1342" +setup_xfail "*" +fail "was able to set nonexisting text as faq" + +send "1343 94\n" +simple_expect "=1343 $server_compat_version 1 2 3 4 0 3 { 1 9 5 $any_time 00000000 1 [holl "compface must die"] 2 13 5 $any_time 00000000 1 [holl "maint@kom"] 3 14 5 $any_time 00000000 1 [holl "999"] }" + +send "1344 95 1 { 2 } 0 { }\n" +simple_expect "=1344" + +send "1345 94\n" +# This test assumes that the deleted bit is set, but the item is still +# visible. +simple_expect "=1345 $server_compat_version 1 2 3 4 0 3 { 1 9 5 $any_time 00000000 1 [holl "compface must die"] 2 13 5 $any_time 10000000 1 [holl "maint@kom"] 3 14 5 $any_time 00000000 1 [holl "999"] }" +setup_xfail "*" +fail "the deleted bit is used on a global aux-item" + +# test call 96 (query-predefined-aux-items) +talk_to client 1 +send "1346 96\n" +simple_expect "=1346 15 { 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 }" + +# test call 97 (set-expire) +send "1347 97 10 7123123\n" +simple_expect "=1347" +send "1348 91 10\n" +simple_expect "=1348 [holl "aux in general"] 01001000 $time_c_10 $time_c_10 8 0 8 0 8 0 77 0 1 0 7123123 1 { 1 14 8 $time_c_10 00000000 1 [holl "10"] }" + +# test call 98 (query-read-texts) +send "1349 98 6 7\n" +simple_expect "=1349 $any_time 7 100 6 0 \\* 6 $any_time 00000000" + # FIXME: test call 99 # FIXME: test call 100 # FIXME: test call 101 @@ -1236,38 +1273,38 @@ simple_expect "=1340 $server_compat_version 1 2 3 4 0 0 \\*" # FIXME: test call 104 # There is no call 105--yet. -send "1341 105\n" -simple_expect "%1341 2 0" +send "1350 105\n" +simple_expect "%1350 2 0" # There is no call 106--yet. -send "1342 106\n" -simple_expect "%1342 2 0" +send "1351 106\n" +simple_expect "%1351 2 0" # There is no call 107--yet. -send "1343 107\n" -simple_expect "%1343 2 0" +send "1352 107\n" +simple_expect "%1352 2 0" # There is no call 108--yet. -send "1344 108\n" -simple_expect "%1344 2 0" +send "1353 108\n" +simple_expect "%1353 2 0" # There is no call 109--yet. -send "1345 109\n" -simple_expect "%1345 2 0" +send "1354 109\n" +simple_expect "%1354 2 0" # There is no call 110--yet. -send "1346 110\n" -simple_expect "%1346 2 0" +send "1355 110\n" +simple_expect "%1355 2 0" # Disconnect all but the first session talk_to client 2 -send "1347 55 4\n" -simple_expect "=1347" +send "1356 55 4\n" +simple_expect "=1356" client_death 2 talk_to client 1 -send "1348 55 2\n" -simple_expect "=1348" +send "1357 55 2\n" +simple_expect "=1357" simple_expect ":2 13 8 2" client_death 1 @@ -1275,21 +1312,21 @@ client_death 1 talk_to client 0 simple_expect ":2 13 8 2" -send "1349 62 5 [holl "bar"] 0\n" +send "1358 62 5 [holl "bar"] 0\n" simple_expect ":2 13 6 1" simple_expect ":2 9 5 1" -simple_expect "=1349" +simple_expect "=1358" -send "1350 42 255\n" -simple_expect "=1350" "42=enable succeeded" -send "1351 43\n" +send "1359 42 255\n" +simple_expect "=1359" "42=enable succeeded" +send "1360 43\n" simple_expect ":0 7" simple_expect ":0 7" -simple_expect "=1351" +simple_expect "=1360" talk_to client 0 -send "1352 44 0\n" -simple_expect "=1352" "44=shutdown-kom succeeded" +send "1361 44 0\n" +simple_expect "=1361" "44=shutdown-kom succeeded" simple_expect ":2 13 5 1" client_death 0 lyskomd_death