Commit 8ff5c829 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Implement part of the test.

parent 01ed061c
......@@ -130,87 +130,154 @@ simple_expect "=1012 3"
# Test send-comments-to
#
set next_conf 11
# Attempt to set "0" while creating a conference.
# Should fail, since we can only set send-comments-to on letterboxes.
FIXME
talk_to client 1
send "1013 88 [holl "conf $next_conf"] 00000000 1 { 33 00000000 1 [holl "0"] }\n"
extracting_expect "%1013 (48|49) 0" errorcode 1
want_illegal_aux_item "Correct error code for send-comments-to on conference"
# Attempt to set "1" while creating a conference.
# Should fail, since we can only set send-comments-to on letterboxes.
FIXME
send "1014 88 [holl "conf $next_conf"] 00000000 1 { 33 00000000 1 [holl "1"] }\n"
extracting_expect "%1014 (48|49) 0" errorcode 1
want_illegal_aux_item "Correct error code for send-comments-to on conference"
# Attempt to set "0" while creating a text.
# Should fail, since we can only set send-comments-to on letterboxes.
FIXME
send "1015 86 [holl "text N"] 1 { 0 1 } 1 { 33 00000000 1 [holl "0"] }\n"
extracting_expect "%1015 (48|49) 0" errorcode 1
want_illegal_aux_item "Correct error code for send-comments-to on texts"
# Attempt to set "1" while creating a text.
# Should fail, since we can only set send-comments-to on letterboxes.
FIXME
send "1016 86 [holl "text N"] 1 { 0 1 } 1 { 33 00000000 1 [holl "1"] }\n"
extracting_expect "%1016 (48|49) 0" errorcode 1
want_illegal_aux_item "Correct error code for send-comments-to on texts"
# Attempt to set "0" on server while enabled.
# Attempt to set "0" on system while enabled.
# Should fail, since we can only set send-comments-to on letterboxes.
FIXME
talk_to client 0
enable
send "1017 95 0 { } 1 { 33 00000000 1 [holl "0"] }\n"
extracting_expect "%1017 (48|49) 0" errorcode 1
want_illegal_aux_item "Correct error code for send-comments-to on system"
# Attempt to set "1" on server while enabled.
# Attempt to set "1" on system while enabled.
# Should fail, since we can only set send-comments-to on letterboxes.
FIXME
send "1018 95 0 { } 1 { 33 00000000 1 [holl "1"] }\n"
extracting_expect "%1018 (48|49) 0" errorcode 1
want_illegal_aux_item "Correct error code for send-comments-to on system"
# Attempt to set "0" on an existing conference.
# Should fail, since we can only set send-comments-to on letterboxes.
FIXME
talk_to client 1
send "1019 93 10 0 { } 1 { 33 00000000 1 [holl "0"] }\n"
extracting_expect "%1019 (48|49) 0" errorcode 1
want_illegal_aux_item "Correct error code for send-comments-to on conference"
# Attempt to set "1" on an existing conference.
# Should fail, since we can only set send-comments-to on letterboxes.
FIXME
send "1020 93 10 0 { } 1 { 33 00000000 1 [holl "1"] }\n"
extracting_expect "%1020 (48|49) 0" errorcode 1
want_illegal_aux_item "Correct error code for send-comments-to on conference"
# Attempt to set "0" on an existing text.
# Should fail, since we can only set send-comments-to on letterboxes.
FIXME
send "1021 92 3 0 { } 1 { 33 00000000 1 [holl "0"] }\n"
extracting_expect "%1021 (48|49) 0" errorcode 1
want_illegal_aux_item "Correct error code for send-comments-to on text"
# Attempt to set "1" on an existing text.
# Should fail, since we can only set send-comments-to on letterboxes.
FIXME
send "1022 92 3 0 { } 1 { 33 00000000 1 [holl "1"] }\n"
extracting_expect "%1022 (48|49) 0" errorcode 1
want_illegal_aux_item "Correct error code for send-comments-to on text"
# Attempt to set "0" while creating a person.
# Should work.
FIXME
client_start 3
talk_to client 3
send "A4Hheja\n"
simple_expect "LysKOM"
send "1023 89 [holl "person $next_conf"] [holl "pwd"] 00000000 1 { 33 00000000 1 [holl "0"] }\n"
extracting_expect "=1023 (\[0-9\]*)" conf_no 1
setup_xfail "*-*-*" "Bug 146"
if {$conf_no == $next_conf} {
pass
set next_conf [expr {1 + $next_conf}]
} else {
fail "got wrong person number"
set next_conf [expr {1 + $conf_no}]
}
# Attempt to set "1" while creating a person.
# Should work.
FIXME
send "1024 89 [holl "person $next_conf"] [holl "pwd"] 00000000 1 { 33 00000000 1 [holl "1"] }\n"
simple_expect "=1024 $next_conf"
set next_conf [expr {1 + $next_conf}]
# Attempt to set "99" while creating a person.
# Should fail, because no such conference exists, but because there is
# no mirror aux item (bug 314) this will work.
FIXME
send "1025 89 [holl "person $next_conf"] [holl "pwd"] 00000000 1 { 33 00000000 1 [holl "99"] }\n"
# We need a version of simple_expect with a list of expected errors...
# For now, we only list the error we expect.
simple_expect "=1025 $next_conf"
setup_xfail "*-*-*" "Bug 314"
fail "Creation of person with send-comments-to to nonexisting conference forbidden"
set next_conf [expr {1 + $next_conf}]
# Attempt to set "8", a secret conference, while creating a person.
# Should fail, because no such conference exists, but because there is
# no mirror aux item (bug 314) this will work.
client_start 3
talk_to client 3
send "A4Hheja\n"
simple_expect "LysKOM"
FIXME
send "1013 1\n"
simple_expect "=1013"
send "1026 89 [holl "person $next_conf"] [holl "pwd"] 00000000 1 { 33 00000000 1 [holl "8"] }\n"
# We need a version of simple_expect with a list of expected errors...
# For now, we only list the error we expect.
simple_expect "=1026 $next_conf"
setup_xfail "*-*-*" "Bug 314"
fail "Creation of person with send-comments-to to secret conference forbidden"
set next_conf [expr {1 + $next_conf}]
# Attempt to set "9", an rd-prot conference, while creating a person.
# Should work.
FIXME
send "1027 89 [holl "person $next_conf"] [holl "pwd"] 00000000 1 { 33 00000000 1 [holl "9"] }\n"
simple_expect "=1027 $next_conf"
set created_person $next_conf
set next_conf [expr {1 + $next_conf}]
# Set "10", a secret conference that is visible to the
# administrator. Should fail -- there can be only one send-comments-to.
# Set "9", an rd-prot conference, on person 6.
# Should work.
talk_to client 1
send "1028 93 6 0 { } 1 { 33 00000000 1 [holl "9"] }\n"
simple_expect "=1028"
# Set "10", a secret conference that is visible to the administrator,
# on person 6. Should fail -- there can be only one send-comments-to.
talk_to client 0
enable
FIXME
send "1029 93 6 0 { } 1 { 33 00000000 1 [holl "10"] }\n"
setup_xfail "*-*-*" "Bug 327"
if {0} {
simple_expect "%1029 49 0"
} else {
fail "unique dosen't mean globally unique"
simple_expect "=1029"
# Remove the send-comments-to.
send "900 93 6 1 { 2 } 0 { }\n"
simple_expect "=900"
}
# Remove the send-comments-to.
FIXME
send "1030 93 6 1 { 1 } 0 { }\n"
simple_expect "=1030"
# Set "10", a secret conference that is visible to the
# administrator and to person 6. Should work.
FIXME
send "1031 93 6 0 { } 1 { 33 00000000 1 [holl "10"] }\n"
simple_expect "=1031"
# Fetch the conference status of person 6. The aux-item should be
# visible.
......@@ -226,14 +293,14 @@ FIXME
# to see it.
talk_to client 2
# (Check that the various get-conf-stat* calls really fail.)
send "1014 13 10 0\n"
simple_expect "%1014 9 10"
send "1015 13 10 1\n"
simple_expect "%1015 9 10"
send "1016 50 10\n"
simple_expect "%1016 9 10"
send "1017 91 10\n"
simple_expect "%1017 9 10"
send "1032 13 10 0\n"
simple_expect "%1032 9 10"
send "1033 13 10 1\n"
simple_expect "%1033 9 10"
send "1034 50 10\n"
simple_expect "%1034 9 10"
send "1035 91 10\n"
simple_expect "%1035 9 10"
FIXME
# Remove the aux-item.
......@@ -333,8 +400,8 @@ FIXME
talk_to client 0
enable
send "1018 44 0\n"
simple_expect "=1018"
send "1036 44 0\n"
simple_expect "=1036"
client_death 0
client_death 1
......
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