Commit 737b5a2a authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Test call 0, 1, 2 and 3.

parent 59b29a02
......@@ -2,7 +2,7 @@
#
# The following objects are created in this test case:
# Conferences
# 7 "(So called) Christian Music"
# 7 "(So called) Christian Music", later "PRIMa musik"
# Persons
# 6 "Per Cederqvist"
# Member of 7.
......@@ -21,6 +21,8 @@
# 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").
# 2 logged in as person 8 for brief moments. Mostly not logged in.
# Default asyncs; does not us user_active or set_client_version.
read_versions
lyskomd_start
......@@ -186,10 +188,80 @@ send "1034 35\n"
simple_expect "=1034 $any_time"
talk_to client 1
# FIXME: test call 0
# FIXME: test call 1
# FIXME: test call 2
# FIXME: test call 3
# 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"]"
# FIXME: test call 4
# FIXME: test call 5
# FIXME: test call 6
......@@ -293,32 +365,32 @@ talk_to client 1
# FIXME: test call 104
# There is no call 105--yet.
send "1035 105\n"
simple_expect "%1035 2 0"
send "1050 105\n"
simple_expect "%1050 2 0"
# There is no call 106--yet.
send "1036 106\n"
simple_expect "%1036 2 0"
send "1051 106\n"
simple_expect "%1051 2 0"
# There is no call 107--yet.
send "1037 107\n"
simple_expect "%1037 2 0"
send "1052 107\n"
simple_expect "%1052 2 0"
# There is no call 108--yet.
send "1038 108\n"
simple_expect "%1038 2 0"
send "1053 108\n"
simple_expect "%1053 2 0"
# There is no call 109--yet.
send "1039 109\n"
simple_expect "%1039 2 0"
send "1054 109\n"
simple_expect "%1054 2 0"
# There is no call 110--yet.
send "1040 110\n"
simple_expect "%1040 2 0"
send "1055 110\n"
simple_expect "%1055 2 0"
talk_to client 1
send "1041 55 2\n"
simple_expect "=1041"
send "1056 55 2\n"
simple_expect "=1056"
simple_expect ":2 13 8 2"
client_death 1
......@@ -326,15 +398,19 @@ client_death 1
talk_to client 0
simple_expect ":2 13 8 2"
send "1042 62 5 [holl "gazonk"] 0\n"
send "1057 62 5 [holl "gazonk"] 0\n"
simple_expect ":2 13 6 1"
simple_expect ":2 9 5 1"
simple_expect "=1042"
simple_expect "=1057"
send "1043 42 255\n"
simple_expect "=1043" "42=enable succeeded"
send "1044 44 0\n"
simple_expect "=1044" "44=shutdown-kom succeeded"
send "1058 42 255\n"
simple_expect "=1058" "42=enable succeeded"
send "1059 44 0\n"
simple_expect "=1059" "44=shutdown-kom succeeded"
simple_expect ":2 13 5 1"
client_death 0
# 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
lyskomd_death
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment