Commit 5d810b9b authored by Per Cederqvist's avatar Per Cederqvist
Browse files

New test case for bug 37. Bugs 593, 594, 595 and 596 were found while

writing this test case...
parent 072988c3
......@@ -227,14 +227,32 @@ simple_expect "=1043 $any_time 12 200 0 0 \\*"
#
# gazonk does get-unread-confs of bar. Should return undefined-person.
send "1044 52 7\n"
good_bad_expect "%1044 10 7" "=0 \\*" "Bug 37"
# gazonk does get-membership of bar. Should return undefined-person.
send "1045 99 7 0 100 1\n"
simple_expect "%1045 10 7"
# gazonk does get-membership-old of bar. Should return undefined-person.
send "1046 46 7 0 100 1\n"
simple_expect "%1046 10 7"
# gazonk does query-read-texts on bar and 10, 11 and 12. undefined-person.
send "1047 98 7 10\n"
simple_expect "%1047 10 7"
send "1048 98 7 11\n"
simple_expect "%1048 10 7"
send "1049 98 7 12\n"
simple_expect "%1049 10 7"
# gazonk does query-read-texts-old on bar and 10, 11 and 12. undefined-person.
send "1050 9 7 10\n"
simple_expect "%1050 10 7"
send "1051 9 7 11\n"
simple_expect "%1051 10 7"
send "1052 9 7 12\n"
simple_expect "%1052 10 7"
# gazonk does <FIXME (bug 590)> on bar and 10, 11 and 12. undefined-person.
......@@ -243,14 +261,32 @@ simple_expect "=1043 $any_time 12 200 0 0 \\*"
#
# gazonk does get-unread-confs of citrus. Should return the empty list.
send "1053 52 8\n"
simple_expect "=1053 0 \\*"
# gazonk does get-membership of citrus. Should return 4 { 6 11 12 }.
# gazonk does get-membership of citrus. Should return 3 { 6 11 12 }.
send "1054 99 8 0 100 1\n"
simple_expect "=1054 3 { 0 $any_time 8 255 0 0 \\* 8 $any_time 00000000 1 $any_time 11 200 0 0 \\* 7 $any_time 10000000 2 $any_time 12 200 0 0 \\* 7 $any_time 10000000 }"
# gazonk does get-membership-old of citrus. Should return 4 { 6 11 12 }.
# gazonk does get-membership-old of citrus. Should return 3 { 6 11 12 }.
send "1055 46 8 0 100 1\n"
simple_expect "=1055 3 { $any_time 8 255 0 0 \\* $any_time 11 200 0 0 \\* $any_time 12 200 0 0 \\* }"
# gazonk does query-read-texts on citrus and 10, 11 and 12. 10 should fail.
send "1056 98 8 10\n"
simple_expect "%1056 9 10"
send "1057 98 8 11\n"
simple_expect "=1057 2 $any_time 11 200 0 0 \\* 7 $any_time 10000000"
send "1058 98 8 12\n"
simple_expect "=1058 3 $any_time 12 200 0 0 \\* 7 $any_time 10000000"
# gazonk does query-read-texts-old on citrus and 10, 11 and 12. 10 fails.
send "1059 9 8 10\n"
simple_expect "%1059 9 10"
send "1060 9 8 11\n"
simple_expect "=1060 $any_time 11 200 0 0 \\*"
send "1061 9 8 12\n"
simple_expect "=1061 $any_time 12 200 0 0 \\*"
# gazonk does <FIXME (bug 590)> on citrus and 10, 11 and 12. 10 should fail.
......@@ -258,63 +294,220 @@ simple_expect "=1043 $any_time 12 200 0 0 \\*"
# foo writes a text with secret, rd-prot and public as recipients.
#
talk_to client 0
send "1062 86 [holl "foo"] 3 { 0 10 0 11 0 12 } 0 { }\n"
simple_expect "=1062 1"
#
# foo examines foo
#
# foo does get-unread-confs of foo. Should return 3 { 10 11 12 }.
send "1063 52 6\n"
simple_expect "=1063 3 { 10 11 12 }"
# ... & copy from above
# foo does get-membership of foo. Should return 4 { 6 10 11 12 }.
send "1064 99 6 0 100 1\n"
simple_expect "=1064 4 { 0 $any_time 6 255 0 0 \\* 6 $any_time 00000000 1 $any_time 10 200 0 0 \\* 7 $any_time 10000000 2 $any_time 11 200 0 0 \\* 7 $any_time 10000000 3 $any_time 12 200 0 0 \\* 7 $any_time 10000000 }"
# foo does get-membership-old of foo. Should return 4 { 6 10 11 12 }.
send "1065 46 6 0 100 1\n"
simple_expect "=1065 4 { $any_time 6 255 0 0 \\* $any_time 10 200 0 0 \\* $any_time 11 200 0 0 \\* $any_time 12 200 0 0 \\* }"
# foo does query-read-texts on foo and 10, 11 and 12. Should get results.
send "1066 98 6 10\n"
simple_expect "=1066 1 $any_time 10 200 0 0 \\* 7 $any_time 10000000"
send "1067 98 6 11\n"
simple_expect "=1067 2 $any_time 11 200 0 0 \\* 7 $any_time 10000000"
send "1068 98 6 12\n"
simple_expect "=1068 3 $any_time 12 200 0 0 \\* 7 $any_time 10000000"
# foo does query-read-texts-old on foo and 10, 11 and 12. Should get results.
send "1069 9 6 10\n"
simple_expect "=1069 $any_time 10 200 0 0 \\*"
send "1070 9 6 11\n"
simple_expect "=1070 $any_time 11 200 0 0 \\*"
send "1071 9 6 12\n"
simple_expect "=1071 $any_time 12 200 0 0 \\*"
# foo does <FIXME (bug 590)> on foo and 10, 11 and 12. Should get results.
#
# gazonk examines foo
# gazonk examines foo.
#
talk_to client 3
# gazonk does get-unread-confs of foo. Should return 2 { 11 12 }.
send "1072 52 6\n"
good_bad_expect "=1072 2 { 11 12 }" "=1 { 12 }" "Bug 596"
# gazonk does get-membership of foo. Should return 3 { 6 11 12 }.
send "1073 99 6 0 100 1\n"
simple_expect "=1073 3 { 0 $any_time 6 255 0 0 \\* 6 $any_time 00000000 1 $any_time 11 200 0 0 \\* 7 $any_time 10000000 2 $any_time 12 200 0 0 \\* 7 $any_time 10000000 }"
# (Just a quick check: does the renumber work properly even if we don't
# start from the beginning of the list?)
send "1074 99 6 2 100 1\n"
simple_expect "=1074 1 { 2 $any_time 12 200 0 0 \\* 7 $any_time 10000000 }"
# gazonk does get-membership-old of foo. Should return 3 { 6 11 12 }.
send "1075 46 6 0 100 1\n"
simple_expect "=1075 3 { $any_time 6 255 0 0 \\* $any_time 11 200 0 0 \\* $any_time 12 200 0 0 \\* }"
# gazonk does query-read-texts on foo and 10, 11 and 12. 10 should fail.
send "1076 98 6 10\n"
simple_expect "%1076 9 10"
send "1077 98 6 11\n"
extracting_expect "=1077 (1|2) $any_time 11 200 0 0 \\* 7 $any_time 10000000" pos 1
check_pos $pos 1
send "1078 98 6 12\n"
extracting_expect "=1078 (2|3) $any_time 12 200 0 0 \\* 7 $any_time 10000000" pos 1
check_pos $pos 2
# gazonk does query-read-texts-old on foo and 10, 11 and 12. 10 should fail.
send "1079 9 6 10\n"
simple_expect "%1079 9 10"
send "1080 9 6 11\n"
simple_expect "=1080 $any_time 11 200 0 0 \\*"
send "1081 9 6 12\n"
simple_expect "=1081 $any_time 12 200 0 0 \\*"
# gazonk does <FIXME (bug 590)> on foo and 10, 11 and 12. 10 should fail.
# ... & copy from above
#
# gazonk examines bar
#
# gazonk does get-unread-confs of bar. Should return undefined-person.
send "1082 52 7\n"
good_bad_expect "%1082 10 7" "=1 { 12 }" "Bug 37"
# gazonk does get-membership of bar. Should return undefined-person.
send "1083 99 7 0 100 1\n"
simple_expect "%1083 10 7"
# gazonk does get-membership-old of bar. Should return undefined-person.
send "1084 46 7 0 100 1\n"
simple_expect "%1084 10 7"
# gazonk does query-read-texts on bar and 10, 11 and 12. undefined-person.
send "1085 98 7 10\n"
simple_expect "%1085 10 7"
send "1086 98 7 11\n"
simple_expect "%1086 10 7"
send "1087 98 7 12\n"
simple_expect "%1087 10 7"
# gazonk does query-read-texts-old on bar and 10, 11 and 12. undefined-person.
send "1088 9 7 10\n"
simple_expect "%1088 10 7"
send "1089 9 7 11\n"
simple_expect "%1089 10 7"
send "1090 9 7 12\n"
simple_expect "%1090 10 7"
# gazonk does <FIXME (bug 590)> on bar and 10, 11 and 12. undefined-person.
# ... & copy from above
#
# gazonk examines citrus.
#
# gazonk does get-unread-confs of citrus. Should return the empty list.
send "1091 52 8\n"
good_bad_expect "=1091 0 \\*" "=1 { 12 }" "Bug 595"
# gazonk does get-membership of citrus. Should return 3 { 6 11 12 }.
send "1092 99 8 0 100 1\n"
simple_expect "=1092 3 { 0 $any_time 8 255 0 0 \\* 8 $any_time 00000000 1 $any_time 11 200 0 0 \\* 7 $any_time 10000000 2 $any_time 12 200 0 0 \\* 7 $any_time 10000000 }"
# gazonk does get-membership-old of citrus. Should return 3 { 6 11 12 }.
send "1093 46 8 0 100 1\n"
simple_expect "=1093 3 { $any_time 8 255 0 0 \\* $any_time 11 200 0 0 \\* $any_time 12 200 0 0 \\* }"
# gazonk does query-read-texts on citrus and 10, 11 and 12. 10 should fail.
send "1094 98 8 10\n"
simple_expect "%1094 9 10"
send "1095 98 8 11\n"
simple_expect "=1095 2 $any_time 11 200 0 0 \\* 7 $any_time 10000000"
send "1096 98 8 12\n"
simple_expect "=1096 3 $any_time 12 200 0 0 \\* 7 $any_time 10000000"
# gazonk does query-read-texts-old on citrus and 10, 11 and 12. 10 fails.
send "1097 9 8 10\n"
simple_expect "%1097 9 10"
send "1098 9 8 11\n"
simple_expect "=1098 $any_time 11 200 0 0 \\*"
send "1099 9 8 12\n"
simple_expect "=1099 $any_time 12 200 0 0 \\*"
# gazonk does <FIXME (bug 590)> on citrus and 10, 11 and 12. 10 should fail.
# ... & copy from above
#
# mark as read
#
# foo marks the text as read
talk_to client 0
send "1100 27 10 1 { 1 }\n"
simple_expect "=1100"
send "1101 27 11 1 { 1 }\n"
simple_expect "=1101"
send "1102 27 12 1 { 1 }\n"
simple_expect "=1102"
# bar marks the text as read
# gazonk marks the text as read
talk_to client 1
send "1103 27 10 1 { 1 }\n"
simple_expect "=1103"
send "1104 27 11 1 { 1 }\n"
simple_expect "=1104"
send "1105 27 12 1 { 1 }\n"
simple_expect "=1105"
# citrus marks the text as read
talk_to client 2
send "1106 27 10 1 { 1 }\n"
simple_expect "=1106"
send "1107 27 11 1 { 1 }\n"
simple_expect "=1107"
send "1108 27 12 1 { 1 }\n"
simple_expect "=1108"
#
# foo examines foo.
#
# foo does get-unread-confs of foo. Should return the empty list.
send "1109 52 6\n"
simple_expect "=1109 0 \\*"
# foo does get-membership of foo. Should return 4 { 6 10 11 12 }.
send "1110 99 6 0 100 1\n"
simple_expect "=1110 4 { 0 $any_time 6 255 0 0 \\* 6 $any_time 00000000 1 $any_time 10 200 1 0 \\* 7 $any_time 10000000 2 $any_time 11 200 1 0 \\* 7 $any_time 10000000 3 $any_time 12 200 1 0 \\* 7 $any_time 10000000 }"
# foo does get-membership-old of foo. Should return 4 { 6 10 11 12 }.
send "1111 46 6 0 100 1\n"
simple_expect "=1111 4 { $any_time 6 255 0 0 \\* $any_time 10 200 1 0 \\* $any_time 11 200 1 0 \\* $any_time 12 200 1 0 \\* }"
# foo does query-read-texts on foo and 10, 11 and 12. Should get results.
send "1112 98 6 10\n"
simple_expect "=1112 1 $any_time 10 200 1 0 \\* 7 $any_time 10000000"
send "1113 98 6 11\n"
simple_expect "=1113 2 $any_time 11 200 1 0 \\* 7 $any_time 10000000"
send "1114 98 6 12\n"
simple_expect "=1114 3 $any_time 12 200 1 0 \\* 7 $any_time 10000000"
# foo does query-read-texts-old on foo and 10, 11 and 12. Should get results.
send "1115 9 6 10\n"
simple_expect "=1115 $any_time 10 200 1 0 \\*"
send "1116 9 6 11\n"
simple_expect "=1116 $any_time 11 200 1 0 \\*"
send "1117 9 6 12\n"
simple_expect "=1117 $any_time 12 200 1 0 \\*"
# foo does <FIXME (bug 590)> on foo and 10, 11 and 12. Should get results.
......@@ -322,15 +515,37 @@ simple_expect "=1043 $any_time 12 200 0 0 \\*"
# gazonk examines foo.
#
talk_to client 3
# gazonk does get-unread-confs of foo. Should return the empty list.
send "1118 52 6\n"
simple_expect "=1118 0 \\*"
# gazonk does get-membership of foo. Should return 4 { 6 11 12 }.
# gazonk does get-membership of foo. Should return 3 { 6 11 12 }.
send "1119 99 6 0 100 1\n"
simple_expect "=1119 3 { 0 $any_time 6 255 0 0 \\* 6 $any_time 00000000 1 $any_time 11 200 1 0 \\* 7 $any_time 10000000 2 $any_time 12 200 1 0 \\* 7 $any_time 10000000 }"
# gazonk does get-membership-old of foo. Should return 4 { 6 11 12 }.
# gazonk does get-membership-old of foo. Should return 3 { 6 11 12 }.
send "1120 46 6 0 100 1\n"
simple_expect "=1120 3 { $any_time 6 255 0 0 \\* $any_time 11 200 1 0 \\* $any_time 12 200 1 0 \\* }"
# gazonk does query-read-texts on foo and 10, 11 and 12. 10 should fail.
send "1121 98 6 10\n"
simple_expect "%1121 9 10"
send "1122 98 6 11\n"
extracting_expect "=1122 (1|2) $any_time 11 200 1 0 \\* 7 $any_time 10000000" pos 1
check_pos $pos 1
send "1123 98 6 12\n"
extracting_expect "=1123 (2|3) $any_time 12 200 1 0 \\* 7 $any_time 10000000" pos 1
check_pos $pos 2
# gazonk does query-read-texts-old on foo and 10, 11 and 12. 10 should fail.
send "1124 9 6 10\n"
simple_expect "%1124 9 10"
send "1125 9 6 11\n"
simple_expect "=1125 $any_time 11 200 1 0 \\*"
send "1126 9 6 12\n"
simple_expect "=1126 $any_time 12 200 1 0 \\*"
# gazonk does <FIXME (bug 590)> on foo and 10, 11 and 12. 10 should fail.
......@@ -339,14 +554,32 @@ simple_expect "=1043 $any_time 12 200 0 0 \\*"
#
# gazonk does get-unread-confs of bar. Should return undefined-person.
send "1127 52 7\n"
good_bad_expect "%1127 10 7" "=0 \\*" "Bug 37"
# gazonk does get-membership of bar. Should return undefined-person.
send "1128 99 7 0 100 1\n"
simple_expect "%1128 10 7"
# gazonk does get-membership-old of bar. Should return undefined-person.
send "1129 46 7 0 100 1\n"
simple_expect "%1129 10 7"
# gazonk does query-read-texts on bar and 10, 11 and 12. undefined-person.
send "1130 98 7 10\n"
simple_expect "%1130 10 7"
send "1131 98 7 11\n"
simple_expect "%1131 10 7"
send "1132 98 7 12\n"
simple_expect "%1132 10 7"
# gazonk does query-read-texts-old on bar and 10, 11 and 12. undefined-person.
send "1133 9 7 10\n"
simple_expect "%1133 10 7"
send "1134 9 7 11\n"
simple_expect "%1134 10 7"
send "1135 9 7 12\n"
simple_expect "%1135 10 7"
# gazonk does <FIXME (bug 590)> on bar and 10, 11 and 12. undefined-person.
......@@ -355,16 +588,46 @@ simple_expect "=1043 $any_time 12 200 0 0 \\*"
#
# gazonk does get-unread-confs of citrus. Should return the empty list.
send "1136 52 8\n"
simple_expect "=1136 0 \\*"
# gazonk does get-membership of citrus. Should return 4 { 6 11 12 }.
send "1137 99 8 0 100 1\n"
simple_expect "=1137 3 { 0 $any_time 8 255 0 0 \\* 8 $any_time 00000000 1 $any_time 11 200 0 0 \\* 7 $any_time 10000000 2 $any_time 12 200 0 0 \\* 7 $any_time 10000000 }"
# gazonk does get-membership-old of citrus. Should return 4 { 6 11 12 }.
send "1138 46 8 0 100 1\n"
simple_expect "=1138 3 { $any_time 8 255 0 0 \\* $any_time 11 200 0 0 \\* $any_time 12 200 0 0 \\* }"
# gazonk does query-read-texts on citrus and 10, 11 and 12. 10 should fail.
send "1139 98 8 10\n"
simple_expect "%1139 9 10"
send "1140 98 8 11\n"
simple_expect "=1140 2 $any_time 11 200 0 0 \\* 7 $any_time 10000000"
send "1141 98 8 12\n"
simple_expect "=1141 3 $any_time 12 200 0 0 \\* 7 $any_time 10000000"
# gazonk does query-read-texts-old on citrus and 10, 11 and 12. 10 fails.
send "1142 9 8 10\n"
simple_expect "%1142 9 10"
send "1143 9 8 11\n"
simple_expect "=1143 $any_time 11 200 0 0 \\*"
send "1144 9 8 12\n"
simple_expect "=1144 $any_time 12 200 0 0 \\*"
# gazonk does <FIXME (bug 590)> on citrus and 10, 11 and 12. 10 should fail.
# Shut down.
talk_to client 3
send "1145 0 5 [holl "gazonk"]\n"
simple_expect "=1145"
send "1146 42 255\n"
simple_expect "=1146"
send "1147 44 0\n"
simple_expect "=1147"
client_death 3
client_death 2
client_death 1
client_death 0
lyskomd_death
Supports Markdown
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