1.1 --- a/tests/test_multiple_invitation.sh Thu Mar 29 23:28:32 2018 +0200
1.2 +++ b/tests/test_multiple_invitation.sh Thu Mar 29 23:34:57 2018 +0200
1.3 @@ -2,6 +2,7 @@
1.4
1.5 . "`dirname \"$0\"`/common.sh"
1.6
1.7 +SENDER="mailto:paul.boddie@example.com"
1.8 ROOM="mailto:resource-room-confroom@example.com"
1.9 CAR="mailto:resource-car-porsche911@example.com"
1.10
1.11 @@ -13,77 +14,141 @@
1.12 echo 'Europe/Mariehamn' > "$PREFS/$CAR/TZID"
1.13 echo 'share' > "$PREFS/$CAR/freebusy_sharing"
1.14
1.15 - "$RESOURCE_SCRIPT" $ARGS < $TEMPLATES/fb-request-all.txt 2>> $ERROR \
1.16 -| "$SHOWMAIL" \
1.17 -> out0.tmp
1.18 +# Test the recipient's initial free/busy state.
1.19
1.20 - grep -q 'METHOD:REPLY' out0.tmp \
1.21 -&& ! grep -q '^FREEBUSY' out0.tmp \
1.22 -&& echo "Success" \
1.23 -|| echo "Failed"
1.24 +test_initial_freebusy 'resource'
1.25 +test_initial_freebusy_limited 'resource'
1.26 +
1.27 +# Make a new event.
1.28
1.29 - "$RESOURCE_SCRIPT" $ARGS < $TEMPLATES/fb-request.txt 2>> $ERROR \
1.30 -| "$SHOWMAIL" \
1.31 -> out1.tmp
1.32 +cat > "event_cmd.tmp" <<EOF
1.33 +new
1.34 +period 0 edit 20141126 16 00 00 Europe/Oslo 20141126 17 00 00 Europe/Oslo
1.35 +attendance accept
1.36 +attendee mailto:resource-room-confroom@example.com
1.37 +attendee mailto:resource-car-porsche911@example.com
1.38 +summary Test drive
1.39 +finish
1.40 +update event.tmp
1.41 +publish event_self.tmp
1.42 +UID event_uid.tmp
1.43 +EOF
1.44
1.45 - grep -q 'METHOD:REPLY' out1.tmp \
1.46 -&& ! grep -q '^FREEBUSY' out1.tmp \
1.47 -&& echo "Success" \
1.48 -|| echo "Failed"
1.49 +text_client "$SENDER" "event_cmd.tmp"
1.50 +
1.51 +# Obtain the event UID.
1.52 +
1.53 +read UID1 < "event_uid.tmp"
1.54 +
1.55 +# Register the event at the sender.
1.56 +
1.57 +outgoing_script "event_self.tmp"
1.58 +
1.59 +# Present the event to the recipient.
1.60 +
1.61 +resource_script "event.tmp" "out2.tmp" "out2r.tmp"
1.62
1.63 - "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/event-request-multiple.txt" 2>> $ERROR \
1.64 -| "$SHOWMAIL" \
1.65 -> out2.tmp
1.66 +# Expect replies because each recipient handles the request.
1.67 +
1.68 +# Inspect the room's response.
1.69 +
1.70 +is_present 'METHOD:REPLY' "out2.tmp" && success || failed "out2.tmp"
1.71 +is_present 'ATTENDEE;PARTSTAT=ACCEPTED' "out2.tmp" && success || failed "out2.tmp"
1.72
1.73 - grep -q 'METHOD:REPLY' out2.tmp \
1.74 -&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out2.tmp \
1.75 -&& echo "Success" \
1.76 -|| echo "Failed"
1.77 +# Inspect the car's response.
1.78 +
1.79 +showmail "out2r.tmp" 1 | is_present 'METHOD:REPLY' "out2.tmp" && success || failed "out2.tmp"
1.80 +showmail "out2r.tmp" 1 | is_present 'ATTENDEE;PARTSTAT=ACCEPTED' "out2.tmp" && success || failed "out2.tmp"
1.81 +
1.82 +# Expect free/busy periods for the recipients.
1.83
1.84 - "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/event-request-multiple.txt" 2>> $ERROR \
1.85 -| "$SHOWMAIL" \
1.86 -> out3.tmp
1.87 +list_script "out2f1.tmp" "$ROOM" "freebusy"
1.88 +test_freebusy '20141126T150000Z' '20141126T160000Z' "out2f1.tmp"
1.89 +list_script "out2f2.tmp" "$CAR" "freebusy"
1.90 +test_freebusy '20141126T150000Z' '20141126T160000Z' "out2f2.tmp"
1.91 +
1.92 +# Present a new free/busy request to the resources.
1.93 +# NOTE: We might open the event and use that for the request.
1.94
1.95 - grep -q 'METHOD:REPLY' out3.tmp \
1.96 -&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out3.tmp \
1.97 -&& echo "Success" \
1.98 -|| echo "Failed"
1.99 +cat > "fb_cmd.tmp" <<EOF
1.100 +new
1.101 +period 0 edit 20141126 16 00 00 Europe/Oslo 20141126 19 00 00 Europe/Oslo
1.102 +attendee mailto:resource-room-confroom@example.com
1.103 +attendee mailto:resource-car-porsche911@example.com
1.104 +finish
1.105 +freebusy fb.tmp
1.106 +EOF
1.107 +
1.108 +text_client "$SENDER" "fb_cmd.tmp"
1.109 +
1.110 +# Present the request to the recipients.
1.111
1.112 - "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/fb-request.txt" 2>> $ERROR \
1.113 -| "$SHOWMAIL" \
1.114 -> out4.tmp
1.115 +resource_script "fb.tmp" "out4.tmp" "out4r.tmp"
1.116 +
1.117 +# Expect replies because each recipient handles the request.
1.118 +
1.119 +# Inspect the room's response.
1.120
1.121 - grep -q 'METHOD:REPLY' out4.tmp \
1.122 -&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out4.tmp \
1.123 -&& echo "Success" \
1.124 -|| echo "Failed"
1.125 +is_present 'METHOD:REPLY' "out4.tmp" && success || failed "out4.tmp"
1.126 +is_present 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' "out4.tmp" && success || failed "out4.tmp"
1.127 +
1.128 +# Inspect the car's response.
1.129 +
1.130 +showmail "out4r.tmp" 1 | is_present 'METHOD:REPLY' "out4.tmp" && success || failed "out4.tmp"
1.131 +showmail "out4r.tmp" 1 | is_present 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' "out4.tmp" && success || failed "out4.tmp"
1.132
1.133 - "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/fb-request-car.txt" 2>> $ERROR \
1.134 -| "$SHOWMAIL" \
1.135 -> out5.tmp
1.136 +# Cancel the attendance of the conference room.
1.137 +
1.138 +cat > "event_cancel_cmd.tmp" <<EOF
1.139 +attendee mailto:resource-room-confroom@example.com remove
1.140 +finish
1.141 +cancel event_cancel.tmp
1.142 +EOF
1.143
1.144 - grep -q 'METHOD:REPLY' out5.tmp \
1.145 -&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out5.tmp \
1.146 -&& echo "Success" \
1.147 -|| echo "Failed"
1.148 +text_client_specific "$SENDER" "event_cancel_cmd.tmp" "$UID1"
1.149 +
1.150 +# Present the request to the recipient.
1.151 +
1.152 +resource_script "event_cancel.tmp" "out5.tmp"
1.153 +
1.154 +# Present a new free/busy request to each resource.
1.155
1.156 -"$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-multiple-attendee.txt" 2>> $ERROR
1.157 -echo "Cancel..."
1.158 +cat > "fb_room_cmd.tmp" <<EOF
1.159 +new
1.160 +period 0 edit 20141126 16 00 00 Europe/Oslo 20141126 19 00 00 Europe/Oslo
1.161 +attendee mailto:resource-room-confroom@example.com
1.162 +finish
1.163 +freebusy fb_room.tmp
1.164 +EOF
1.165
1.166 - "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/fb-request.txt" 2>> $ERROR \
1.167 -| "$SHOWMAIL" \
1.168 -> out6.tmp
1.169 +text_client "$SENDER" "fb_room_cmd.tmp"
1.170 +
1.171 +# Present the request to the recipients.
1.172 +
1.173 +resource_script "fb_room.tmp" "out6.tmp"
1.174 +
1.175 +# Expect a reply but with no free/busy periods.
1.176 +
1.177 +is_present 'METHOD:REPLY' "out6.tmp" && success || failed "out6.tmp"
1.178 +is_absent 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' "out6.tmp" && success || failed "out6.tmp"
1.179
1.180 - grep -q 'METHOD:REPLY' out6.tmp \
1.181 -&& ! grep -q '^FREEBUSY' out6.tmp \
1.182 -&& echo "Success" \
1.183 -|| echo "Failed"
1.184 +# Present a new free/busy request to each resource.
1.185 +
1.186 +cat > "fb_car_cmd.tmp" <<EOF
1.187 +new
1.188 +period 0 edit 20141126 16 00 00 Europe/Oslo 20141126 19 00 00 Europe/Oslo
1.189 +attendee mailto:resource-car-porsche911@example.com
1.190 +finish
1.191 +freebusy fb_car.tmp
1.192 +EOF
1.193
1.194 - "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/fb-request-car.txt" 2>> $ERROR \
1.195 -| "$SHOWMAIL" \
1.196 -> out7.tmp
1.197 +text_client "$SENDER" "fb_car_cmd.tmp"
1.198 +
1.199 +# Present the request to the recipients.
1.200
1.201 - grep -q 'METHOD:REPLY' out7.tmp \
1.202 -&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out7.tmp \
1.203 -&& echo "Success" \
1.204 -|| echo "Failed"
1.205 +resource_script "fb_car.tmp" "out7.tmp"
1.206 +
1.207 +# Expect a reply with free/busy periods.
1.208 +
1.209 +is_present 'METHOD:REPLY' "out7.tmp" && success || failed "out7.tmp"
1.210 +is_present 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' "out7.tmp" && success || failed "out7.tmp"
2.1 --- a/tests/test_outgoing_invitation.sh Thu Mar 29 23:28:32 2018 +0200
2.2 +++ b/tests/test_outgoing_invitation.sh Thu Mar 29 23:34:57 2018 +0200
2.3 @@ -3,126 +3,249 @@
2.4 . "`dirname \"$0\"`/common.sh"
2.5
2.6 USER="mailto:paul.boddie@example.com"
2.7 +SENDER=$USER
2.8
2.9 mkdir -p "$PREFS/$USER"
2.10 echo 'Europe/Oslo' > "$PREFS/$USER/TZID"
2.11 echo 'share' > "$PREFS/$USER/freebusy_sharing"
2.12 echo '20141010' > "$PREFS/$USER/window_start"
2.13
2.14 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request.txt" 2>> $ERROR
2.15 +# Make a new event.
2.16
2.17 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.18 -| tee out1.tmp \
2.19 -| grep -q "^20141126T150000Z${TAB}20141126T160000Z" \
2.20 -&& echo "Success" \
2.21 -|| echo "Failed"
2.22 +cat > "event_cmd.tmp" <<EOF
2.23 +new
2.24 +period 0 edit 20141126 16 00 00 Europe/Oslo 20141126 17 00 00 Europe/Oslo
2.25 +attendance accept
2.26 +attendee mailto:harvey.horse@example.com
2.27 +attendee mailto:resource-room-confroom@example.com
2.28 +summary Meeting at 4pm
2.29 +finish
2.30 +publish event_self.tmp
2.31 +UID event_uid.tmp
2.32 +EOF
2.33 +
2.34 +text_client "$SENDER" "event_cmd.tmp"
2.35 +
2.36 +# Obtain the event UID.
2.37 +
2.38 +read UID1 < "event_uid.tmp"
2.39 +
2.40 +# Register the event at the sender.
2.41 +
2.42 +outgoing_script "event_self.tmp"
2.43
2.44 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel.txt" 2>> $ERROR
2.45 -echo "Cancel..."
2.46 +# Expect a free/busy period for the sender at the sender.
2.47 +
2.48 +list_script "out1f.tmp" "$SENDER" "freebusy"
2.49 +test_freebusy '20141126T150000Z' '20141126T160000Z' "out1f.tmp"
2.50 +
2.51 +# Cancel the event.
2.52 +
2.53 +cat > "event_cancel_cmd.tmp" <<EOF
2.54 +finish
2.55 +cancel-publish event_cancel.tmp
2.56 +EOF
2.57
2.58 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.59 -> out2.tmp
2.60 +text_client_specific "$SENDER" "event_cancel_cmd.tmp" "$UID1"
2.61 +
2.62 +# Present the cancellation at the sender.
2.63 +
2.64 +outgoing_script "event_cancel.tmp"
2.65
2.66 - ! grep -q '^2' "out2.tmp" \
2.67 -&& echo "Success" \
2.68 -|| echo "Failed"
2.69 +# Expect no free/busy periods for the sender at the sender.
2.70 +
2.71 +list_script "out2f.tmp" "$SENDER" "freebusy"
2.72 +test_freebusy_missing '20141126T150000Z' '20141126T160000Z' "out2f.tmp"
2.73 +have_occurrences "$UID1" 0 "out2f.tmp" && success || failed "out2f.tmp"
2.74
2.75 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring.txt" 2>> $ERROR
2.76 -
2.77 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.78 -> out3.tmp
2.79 +# Make a recurring event.
2.80
2.81 - [ `cat "out3.tmp" | wc -l` = '3' ] \
2.82 -&& grep -q "^20141212T090000Z${TAB}20141212T100000Z" "out3.tmp" \
2.83 -&& echo "Success" \
2.84 -|| echo "Failed"
2.85 +cat > "event_recurring_cmd.tmp" <<EOF
2.86 +new
2.87 +period 0 edit 20141010 10 00 00 Europe/Oslo 20141010 11 00 00 Europe/Oslo
2.88 +rrule
2.89 +freq monthly 1
2.90 +selection weekday FR 2 end
2.91 +count 3
2.92 +end
2.93 +attendance accept
2.94 +attendee mailto:resource-room-confroom@example.com
2.95 +summary Recurring event
2.96 +finish
2.97 +publish event_recurring_self.tmp
2.98 +UID event_recurring_uid.tmp
2.99 +EOF
2.100 +
2.101 +text_client "$SENDER" "event_recurring_cmd.tmp"
2.102 +
2.103 +# Obtain the event UID.
2.104 +
2.105 +read UID2 < "event_recurring_uid.tmp"
2.106
2.107 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-instance.txt" 2>> $ERROR
2.108 +# Register the event at the sender.
2.109 +
2.110 +outgoing_script "event_recurring_self.tmp"
2.111 +
2.112 +# Expect free/busy periods for the sender at the sender.
2.113
2.114 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.115 -> out4.tmp
2.116 +list_script "out3f.tmp" "$SENDER" "freebusy"
2.117 +test_freebusy '20141010T080000Z' '20141010T090000Z' "out3f.tmp"
2.118 +have_occurrences "$UID2" 3 "out3f.tmp" && success || failed "out3f.tmp"
2.119 +
2.120 +# Cancel a recurrence.
2.121
2.122 - [ `cat "out4.tmp" | wc -l` = '2' ] \
2.123 -&& ! grep -q "^20141114T090000Z${TAB}20141114T100000Z" "out4.tmp" \
2.124 -&& echo "Success" \
2.125 -|| echo "Failed"
2.126 +cat > "event_cancel_recurring_cmd.tmp" <<EOF
2.127 +period 1 cancel
2.128 +finish
2.129 +publish event_cancel_recurring.tmp
2.130 +EOF
2.131 +
2.132 +text_client_specific "$SENDER" "event_cancel_recurring_cmd.tmp" "$UID2"
2.133 +
2.134 +# Present the cancellation at the sender.
2.135 +
2.136 +outgoing_script "event_cancel_recurring.tmp"
2.137
2.138 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-reschedule-instance.txt" 2>> $ERROR
2.139 +# Expect fewer free/busy periods for the sender at the sender.
2.140 +
2.141 +list_script "out4f.tmp" "$SENDER" "freebusy"
2.142 +test_freebusy '20141010T080000Z' '20141010T090000Z' "out4f.tmp"
2.143 +test_freebusy_missing '20141114T090000Z' '20141114T100000Z' "out4f.tmp"
2.144 +have_occurrences "$UID2" 2 "out4f.tmp" && success || failed "out4f.tmp"
2.145 +
2.146 +# Reschedule an instance.
2.147
2.148 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.149 -> out5.tmp
2.150 +cat > "event_reschedule_cmd.tmp" <<EOF
2.151 +period 0 edit 20141011 10 00 00 Europe/Oslo 20141011 11 00 00 Europe/Oslo
2.152 +finish
2.153 +publish event_reschedule_self.tmp
2.154 +EOF
2.155 +
2.156 +text_client_specific "$SENDER" "event_reschedule_cmd.tmp" "$UID2"
2.157 +
2.158 +# Present the rescheduling at the sender.
2.159 +
2.160 +outgoing_script "event_reschedule_self.tmp"
2.161 +
2.162 +# Expect a rescheduled free/busy period for the sender at the sender.
2.163
2.164 - grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out5.tmp" \
2.165 -&& ! grep -q "^20141010T090000Z${TAB}20141010T100000Z" "out5.tmp" \
2.166 -&& echo "Success" \
2.167 -|| echo "Failed"
2.168 +list_script "out5f.tmp" "$SENDER" "freebusy"
2.169 +test_freebusy '20141011T080000Z' '20141011T090000Z' "out5f.tmp"
2.170 +test_freebusy_missing '20141010T080000Z' '20141010T090000Z' "out5f.tmp"
2.171
2.172 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring.txt" 2>> $ERROR
2.173 +# Cancel the event.
2.174 +
2.175 +cat > "event_cancel_recurring_all_cmd.tmp" <<EOF
2.176 +finish
2.177 +cancel-publish event_cancel_recurring_all.tmp
2.178 +EOF
2.179
2.180 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.181 -> out6.tmp
2.182 +text_client_specific "$SENDER" "event_cancel_recurring_all_cmd.tmp" "$UID2"
2.183 +
2.184 +# Present the cancellation at the sender.
2.185 +
2.186 +outgoing_script "event_cancel_recurring_all.tmp"
2.187
2.188 - ! grep -q '^2' "out6.tmp" \
2.189 -&& echo "Success" \
2.190 -|| echo "Failed"
2.191 +# Expect no free/busy periods for the sender at the sender.
2.192 +
2.193 +list_script "out6f.tmp" "$SENDER" "freebusy"
2.194 +test_freebusy_missing '20141011T080000Z' '20141011T090000Z' "out6f.tmp"
2.195 +have_occurrences "$UID2" 0 "out6f.tmp" && success || failed "out6f.tmp"
2.196 +
2.197 +# Make a recurring all-day event.
2.198
2.199 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day.txt" 2>> $ERROR
2.200 +cat > "event_recurring_day_cmd.tmp" <<EOF
2.201 +new
2.202 +period 0 edit 20141010 - 20141010 -
2.203 +rrule
2.204 +freq monthly 1
2.205 +selection weekday FR 2 end
2.206 +count 3
2.207 +end
2.208 +attendance accept
2.209 +attendee mailto:resource-room-confroom@example.com
2.210 +summary Recurring event
2.211 +finish
2.212 +publish event_recurring_day_self.tmp
2.213 +UID event_recurring_day_uid.tmp
2.214 +EOF
2.215
2.216 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.217 -> out7.tmp
2.218 +text_client "$SENDER" "event_recurring_day_cmd.tmp"
2.219 +
2.220 +# Obtain the event UID.
2.221 +
2.222 +read UID3 < "event_recurring_day_uid.tmp"
2.223 +
2.224 +# Register the event at the sender.
2.225
2.226 - [ `cat "out7.tmp" | wc -l` = '3' ] \
2.227 -&& grep -q "^20141211T230000Z${TAB}20141212T230000Z" "out7.tmp" \
2.228 -&& echo "Success" \
2.229 -|| echo "Failed"
2.230 +outgoing_script "event_recurring_day_self.tmp"
2.231 +
2.232 +# Expect free/busy periods for the sender at the sender.
2.233
2.234 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-day.txt" 2>> $ERROR
2.235 +list_script "out7f.tmp" "$SENDER" "freebusy"
2.236 +test_freebusy '20141211T230000Z' '20141212T230000Z' "out7f.tmp"
2.237 +have_occurrences "$UID3" 3 "out7f.tmp" && success || failed "out7f.tmp"
2.238 +
2.239 +# Cancel the event.
2.240
2.241 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.242 -> out8.tmp
2.243 +cat > "event_cancel_recurring_day_cmd.tmp" <<EOF
2.244 +finish
2.245 +cancel-publish event_cancel_recurring_day.tmp
2.246 +EOF
2.247 +
2.248 +text_client_specific "$SENDER" "event_cancel_recurring_day_cmd.tmp" "$UID3"
2.249
2.250 - ! grep -q '^2' "out8.tmp" \
2.251 -&& echo "Success" \
2.252 -|| echo "Failed"
2.253 +# Present the cancellation at the sender.
2.254 +
2.255 +outgoing_script "event_cancel_recurring_day.tmp"
2.256 +
2.257 +# Expect no free/busy periods for the sender at the sender.
2.258 +
2.259 +list_script "out8f.tmp" "$SENDER" "freebusy"
2.260 +test_freebusy_missing '20141211T230000Z' '20141212T230000Z' "out8f.tmp"
2.261 +have_occurrences "$UID2" 0 "out8f.tmp" && success || failed "out8f.tmp"
2.262
2.263 # Switch time zones.
2.264
2.265 echo 'Europe/Mariehamn' > "$PREFS/$USER/TZID"
2.266
2.267 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring.txt" 2>> $ERROR
2.268 +# Register the recurring event at the sender.
2.269 +
2.270 +outgoing_script "event_recurring_self.tmp"
2.271
2.272 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.273 -> out9.tmp
2.274 +# Expect free/busy periods for the sender at the sender.
2.275 +
2.276 +list_script "out9f.tmp" "$SENDER" "freebusy"
2.277 +test_freebusy '20141010T080000Z' '20141010T090000Z' "out9f.tmp"
2.278 +have_occurrences "$UID2" 3 "out9f.tmp" && success || failed "out9f.tmp"
2.279
2.280 - [ `cat "out9.tmp" | wc -l` = '3' ] \
2.281 -&& grep -q "^20141212T090000Z${TAB}20141212T100000Z" "out9.tmp" \
2.282 -&& echo "Success" \
2.283 -|| echo "Failed"
2.284 +# Present the cancellation of the recurring event at the sender.
2.285
2.286 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring.txt" 2>> $ERROR
2.287 +outgoing_script "event_cancel_recurring_all.tmp"
2.288
2.289 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.290 -> out10.tmp
2.291 +# Expect no free/busy periods for the sender at the sender.
2.292
2.293 - ! grep -q '^2' "out10.tmp" \
2.294 -&& echo "Success" \
2.295 -|| echo "Failed"
2.296 +list_script "out10f.tmp" "$SENDER" "freebusy"
2.297 +test_freebusy_missing '20141011T080000Z' '20141011T090000Z' "out10f.tmp"
2.298 +have_occurrences "$UID2" 0 "out10f.tmp" && success || failed "out10f.tmp"
2.299
2.300 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day.txt" 2>> $ERROR
2.301 +# Register the recurring all-day event at the sender.
2.302
2.303 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.304 -> out11.tmp
2.305 +outgoing_script "event_recurring_day_self.tmp"
2.306 +
2.307 +# Expect free/busy periods for the sender at the sender.
2.308 +# With the changed time zone, the periods will be earlier than before.
2.309
2.310 - [ `cat "out11.tmp" | wc -l` = '3' ] \
2.311 -&& grep -q "^20141211T230000Z${TAB}20141212T230000Z" "out11.tmp" \
2.312 -&& echo "Success" \
2.313 -|| echo "Failed"
2.314 +list_script "out11f.tmp" "$SENDER" "freebusy"
2.315 +test_freebusy '20141211T220000Z' '20141212T220000Z' "out11f.tmp"
2.316 +have_occurrences "$UID3" 3 "out11f.tmp" && success || failed "out11f.tmp"
2.317
2.318 -"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-day.txt" 2>> $ERROR
2.319 +# Present the cancellation at the sender.
2.320
2.321 - "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
2.322 -> out12.tmp
2.323 +outgoing_script "event_cancel_recurring_day.tmp"
2.324 +
2.325 +# Expect no free/busy periods for the sender at the sender.
2.326
2.327 - ! grep -q '^2' "out12.tmp" \
2.328 -&& echo "Success" \
2.329 -|| echo "Failed"
2.330 +list_script "out12f.tmp" "$SENDER" "freebusy"
2.331 +test_freebusy_missing '20141211T220000Z' '20141212T220000Z' "out12f.tmp"
2.332 +have_occurrences "$UID2" 0 "out12f.tmp" && success || failed "out12f.tmp"