Commit 538c5c82 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Create a person for session 1 and create a few texts.

parent 941ed5ac
# Check that all functions do the right thing in their most normal use.
#
# The following objects are created in this test case:
# Conferences
# 7 "(So called) Christian Music"
# 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").
read_versions
lyskomd_start
......@@ -41,7 +62,7 @@ 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"
send "1007 28 [holl "Old-style text 2"] 1 { 0 7 }\n"
send "1007 28 [holl "Old-style text 2"] 2 { 0 7 6 99 }\n"
simple_expect ":16 0 2 $any_time 6 0 16 0 2 { 0 7 6 2 }"
simple_expect "=1007 2"
......@@ -59,6 +80,9 @@ simple_expect "LysKOM" "client 1 connected"
send "1009 69 [holl "dgt03"] [holl "sc 1"]\n"
simple_expect "=1009"
# 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.
send "1010 96\n"
simple_expect "=1010 15 { 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 }"
......@@ -107,14 +131,61 @@ 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"
send "1025 80 11 { 0 5 6 7 8 9 11 12 13 14 15 }\n"
simple_expect "=1025"
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"
send "1026 81\n"
simple_expect "=1026 11 { 0 5 6 7 8 9 11 12 13 14 15 }"
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
# FIXME: create a modern person with a few aux-items via client 1.
# FIXME: create a few texts and conferences via client 1.
# FIXME: test call 0
# FIXME: test call 1
# FIXME: test call 2
......@@ -130,7 +201,7 @@ simple_expect "=1026 11 { 0 5 6 7 8 9 11 12 13 14 15 }"
# FIXME: test call 12
# FIXME: test call 13
# FIXME: test call 14
# FIXME: test call 15
# call 15 is tested above
# FIXME: test call 16
# FIXME: test call 17
# FIXME: test call 18
......@@ -222,43 +293,48 @@ simple_expect "=1026 11 { 0 5 6 7 8 9 11 12 13 14 15 }"
# FIXME: test call 104
# There is no call 105--yet.
send "1027 105\n"
simple_expect "%1027 2 0"
send "1035 105\n"
simple_expect "%1035 2 0"
# There is no call 106--yet.
send "1028 106\n"
simple_expect "%1028 2 0"
send "1036 106\n"
simple_expect "%1036 2 0"
# There is no call 107--yet.
send "1029 107\n"
simple_expect "%1029 2 0"
send "1037 107\n"
simple_expect "%1037 2 0"
# There is no call 108--yet.
send "1030 108\n"
simple_expect "%1030 2 0"
send "1038 108\n"
simple_expect "%1038 2 0"
# There is no call 109--yet.
send "1031 109\n"
simple_expect "%1031 2 0"
send "1039 109\n"
simple_expect "%1039 2 0"
# There is no call 110--yet.
send "1032 110\n"
simple_expect "%1032 2 0"
send "1040 110\n"
simple_expect "%1040 2 0"
# FIXME: disconnect client 1
talk_to client 1
send "1041 55 2\n"
simple_expect "=1041"
simple_expect ":2 13 8 2"
client_death 1
# Shut everything down
talk_to client 0
simple_expect ":2 13 8 2"
send "1033 62 5 [holl "gazonk"] 0\n"
send "1042 62 5 [holl "gazonk"] 0\n"
simple_expect ":2 13 6 1"
simple_expect ":2 9 5 1"
simple_expect "=1033"
simple_expect "=1042"
send "1034 42 255\n"
simple_expect "=1034" "42=enable succeeded"
send "1035 44 0\n"
simple_expect "=1035" "44=shutdown-kom succeeded"
send "1043 42 255\n"
simple_expect "=1043" "42=enable succeeded"
send "1044 44 0\n"
simple_expect "=1044" "44=shutdown-kom succeeded"
simple_expect ":2 13 5 1"
client_death 0
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