Commit 6a838ac9 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Initial commit.

parent 88a57120
# Test suite for lyskomd.
# Copyright (C) 2002 Lysator Academic Computer Association.
#
# 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.
# Test sending of async-deleted-text, async-new-text,
# async-new-text-old, async-add-recipient and async-sub-recipient to
# recipients of texts that are linked to the text.
lyskomd_start
client_start 0
talk_to client 0
send "A0H\n"
simple_expect "LysKOM"
send "1000 62 5 6Hgazonk 1\n"
simple_expect "=1000"
# Create the user "Listener". Log in as it.
client_start 1
talk_to client 1
send "A0H\n"
simple_expect "LysKOM"
send "1001 89 [holl "Listener"] [holl "none"] 00000000 0 { }\n"
simple_expect "=1001 6"
send "1002 62 6 [holl "none"] 1\n"
simple_expect "=1002"
send "1003 80 5 { 14 15 16 17 0 }\n"
simple_expect "=1003"
# Join conferences:
#
# Conf_no passive?
# 1 0 (no)
# 2 1 (yes)
send "1004 100 1 6 200 10 00000000\n"
simple_expect "=1004"
send "1005 100 2 6 200 10 01000000\n"
simple_expect "=1005"
# Create base texts:
#
# Text_no Recipient passive?
# 1 1 0 (no)
# 2 2 1 (yes)
talk_to client 0
send "1006 86 [holl "text 1"] 1 { 0 1 } 0 { }\n"
simple_expect "=1006 1"
talk_to client 1
simple_expect ":16 0 1 $any_time 5 0 6 0 2 { 0 1 6 1 }"
simple_expect ":18 15 1 $any_time 5 0 6 0 2 { 0 1 6 1 } 0 \\*"
talk_to client 0
send "1007 86 [holl "text 2"] 1 { 0 2 } 0 { }\n"
simple_expect "=1007 2"
# Text 3: not linked at all.
send "1008 86 [holl "text 3"] 1 { 0 3 } 0 { }\n"
simple_expect "=1008 3"
# Text 4: linked via a comm-to.
send "1009 86 [holl "text 4"] 2 { 0 3 2 1 } 0 { }\n"
simple_expect "=1009 4"
talk_to client 1
simple_expect ":16 0 4 $any_time 5 0 6 0 3 { 0 3 6 2 2 1 }"
simple_expect ":18 15 4 $any_time 5 0 6 0 3 { 0 3 6 2 2 1 } 0 \\*"
# Add conference 4 as recipient of text 4.
talk_to client 0
send "1010 30 4 4 0\n"
simple_expect "=1010"
talk_to client 1
simple_expect ":3 16 4 4 0"
# Remove conference 4 as recipient of text 4.
talk_to client 0
send "1011 31 4 4\n"
simple_expect "=1011"
talk_to client 1
simple_expect ":3 17 4 4 0"
# Delete text 4.
talk_to client 0
send "1012 29 4\n"
simple_expect "=1012"
talk_to client 1
simple_expect ":18 14 4 $any_time 5 0 6 0 3 { 0 3 6 2 2 1 } 0 \\*"
# Text 5: linked via a comm-to, to passive recipient.
# This produces no async messages.
talk_to client 0
send "1013 86 [holl "text 5"] 2 { 0 3 2 2 } 0 { }\n"
simple_expect "=1013 5"
# Add conference 4 as recipient of text 5.
send "1014 30 5 4 0\n"
simple_expect "=1014"
# Remove conference 4 as recipient of text 5.
send "1015 31 5 4\n"
simple_expect "=1015"
# Delete text 5.
send "1016 29 5\n"
simple_expect "=1016"
# Text 6: linked via a footn-to.
send "1017 86 [holl "text 6"] 2 { 0 3 4 1 } 0 { }\n"
simple_expect "=1017 6"
talk_to client 1
simple_expect ":16 0 6 $any_time 5 0 6 0 3 { 0 3 6 4 4 1 }"
simple_expect ":18 15 6 $any_time 5 0 6 0 3 { 0 3 6 4 4 1 } 0 \\*"
# Add conference 4 as recipient of text 6.
talk_to client 0
send "1018 30 6 4 0\n"
simple_expect "=1018"
talk_to client 1
simple_expect ":3 16 6 4 0"
# Remove conference 4 as recipient of text 6.
talk_to client 0
send "1019 31 6 4\n"
simple_expect "=1019"
talk_to client 1
simple_expect ":3 17 6 4 0"
# Delete text 6.
talk_to client 0
send "1020 29 6\n"
simple_expect "=1020"
talk_to client 1
simple_expect ":18 14 6 $any_time 5 0 6 0 3 { 0 3 6 4 4 1 } 0 \\*"
# Text 7: linked via footn-in. For obvious reasons, this cannot
# produce asycn-new-text or async-new-text-old.
talk_to client 0
send "1021 86 [holl "text 7"] 1 { 0 3 } 0 { }\n"
simple_expect "=1021 7"
send "1022 37 1 7\n"
simple_expect "=1022"
talk_to client 1
# FIXME (bug 971): this should produce an async-new-footnote message,
# but no such message exists.
# Add conference 4 as recipient of text 7.
talk_to client 0
send "1023 30 7 4 1\n"
simple_expect "=1023"
talk_to client 1
simple_expect ":3 16 7 4 1"
# Remove conference 4 as recipient of text 7.
talk_to client 0
send "1024 31 7 4\n"
simple_expect "=1024"
talk_to client 1
simple_expect ":3 17 7 4 1"
# Delete text 7.
talk_to client 0
send "1025 29 7\n"
simple_expect "=1025"
talk_to client 1
simple_expect ":18 14 7 $any_time 5 0 6 0 3 { 0 3 6 5 5 1 } 0 \\*"
# Text 8: linked via comm-in. For obvious reasons, this cannot
# produce asycn-new-text or async-new-text-old.
talk_to client 0
send "1026 86 [holl "text 8"] 1 { 0 3 } 0 { }\n"
simple_expect "=1026 8"
send "1027 32 1 8\n"
simple_expect "=1027"
talk_to client 1
# FIXME (bug 971): this should produce an async-new-comment message,
# but no such message exists.
# Add conference 4 as recipient of text 8.
talk_to client 0
send "1028 30 8 4 1\n"
simple_expect "=1028"
talk_to client 1
simple_expect ":3 16 8 4 1"
# Remove conference 4 as recipient of text 8.
talk_to client 0
send "1029 31 8 4\n"
simple_expect "=1029"
talk_to client 1
simple_expect ":3 17 8 4 1"
# Delete text 8.
talk_to client 0
send "1030 29 8\n"
simple_expect "=1030"
talk_to client 1
simple_expect ":18 14 8 $any_time 5 0 6 0 3 { 0 3 6 6 3 1 } 0 \\*"
# FIXME (bug 59): Test for texts linked via aux items:
# - cross-reference
# - aux-mx-mime-belongs-to
# - aux-mx-mime-part-in
# - aux-faq-for-conf
# Also test for broken references in those aux-items.
# FIXME (bug 59): Test for async-sub-recipient when we are not allowed
# to see the recipient.
# FIXME (bug 59): Test for async-sub-recipient when we subtract the
# reason we want to see it.
# Shut everything down.
talk_to client 0
send "1031 42 255\n"
simple_expect "=1031"
send "1032 44 0\n"
simple_expect "=1032"
client_death 0
client_death 1
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