1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/templates/event-cancel-recurring-day.txt Thu Aug 06 01:16:37 2015 +0200
1.3 @@ -0,0 +1,36 @@
1.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
1.5 +MIME-Version: 1.0
1.6 +From: paul.boddie@example.com
1.7 +To: resource-room-confroom@example.com
1.8 +Subject: Cancellation!
1.9 +
1.10 +Cancel the event for resource-room-confroom and paul.boddie.
1.11 +
1.12 +--===============0047278175==
1.13 +Content-Type: text/plain; charset="us-ascii"
1.14 +MIME-Version: 1.0
1.15 +Content-Transfer-Encoding: 7bit
1.16 +
1.17 +This message contains an event.
1.18 +--===============0047278175==
1.19 +MIME-Version: 1.0
1.20 +Content-Transfer-Encoding: 7bit
1.21 +Content-Type: text/calendar; charset="us-ascii"; method="CANCEL"
1.22 +
1.23 +BEGIN:VCALENDAR
1.24 +PRODID:-//imip-agent/test//EN
1.25 +METHOD:CANCEL
1.26 +VERSION:2.0
1.27 +BEGIN:VEVENT
1.28 +ORGANIZER:mailto:paul.boddie@example.com
1.29 +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com
1.30 +ATTENDEE;RSVP=TRUE:mailto:paul.boddie@example.com
1.31 +DTSTAMP:20141009T182400Z
1.32 +DTSTART;TZID=Europe/Oslo:20141010
1.33 +DTEND;TZID=Europe/Oslo:20141011
1.34 +SUMMARY:Recurring event
1.35 +UID:event4@example.com
1.36 +END:VEVENT
1.37 +END:VCALENDAR
1.38 +
1.39 +--===============0047278175==--
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/tests/templates/event-request-person-recurring-day-floating.txt Thu Aug 06 01:16:37 2015 +0200
2.3 @@ -0,0 +1,34 @@
2.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
2.5 +MIME-Version: 1.0
2.6 +From: paul.boddie@example.com
2.7 +To: vincent.vole@example.com
2.8 +Subject: Invitation!
2.9 +
2.10 +--===============0047278175==
2.11 +Content-Type: text/plain; charset="us-ascii"
2.12 +MIME-Version: 1.0
2.13 +Content-Transfer-Encoding: 7bit
2.14 +
2.15 +This message contains an event.
2.16 +--===============0047278175==
2.17 +MIME-Version: 1.0
2.18 +Content-Transfer-Encoding: 7bit
2.19 +Content-Type: text/calendar; charset="us-ascii"; method="REQUEST"
2.20 +
2.21 +BEGIN:VCALENDAR
2.22 +PRODID:-//imip-agent/test//EN
2.23 +METHOD:REQUEST
2.24 +VERSION:2.0
2.25 +BEGIN:VEVENT
2.26 +ORGANIZER:mailto:paul.boddie@example.com
2.27 +ATTENDEE;RSVP=TRUE:mailto:vincent.vole@example.com
2.28 +DTSTAMP:20141009T182400Z
2.29 +DTSTART:20141010
2.30 +DTEND:20141011
2.31 +RRULE:FREQ=MONTHLY;BYDAY=2FR;COUNT=3
2.32 +SUMMARY:Recurring event
2.33 +UID:event12@example.com
2.34 +END:VEVENT
2.35 +END:VCALENDAR
2.36 +
2.37 +--===============0047278175==--
3.1 --- a/tests/test_multiple_invitation.sh Thu Aug 06 01:14:20 2015 +0200
3.2 +++ b/tests/test_multiple_invitation.sh Thu Aug 06 01:16:37 2015 +0200
3.3 @@ -9,7 +9,8 @@
3.4 STATIC=/tmp/static
3.5 PREFS=/tmp/prefs
3.6 ARGS="-S $STORE -P $STATIC -p $PREFS -d"
3.7 -USER="mailto:resource-room-confroom@example.com"
3.8 +ROOM="mailto:resource-room-confroom@example.com"
3.9 +CAR="mailto:resource-car-porsche911@example.com"
3.10 ERROR=err.tmp
3.11
3.12 rm -r $STORE
3.13 @@ -18,9 +19,13 @@
3.14 rm $ERROR
3.15 rm out*.tmp
3.16
3.17 -mkdir -p "$PREFS/$USER"
3.18 -echo 'Europe/Oslo' > "$PREFS/$USER/TZID"
3.19 -echo 'share' > "$PREFS/$USER/freebusy_sharing"
3.20 +mkdir -p "$PREFS/$ROOM"
3.21 +echo 'Europe/Oslo' > "$PREFS/$ROOM/TZID"
3.22 +echo 'share' > "$PREFS/$ROOM/freebusy_sharing"
3.23 +
3.24 +mkdir -p "$PREFS/$CAR"
3.25 +echo 'Europe/Mariehamn' > "$PREFS/$CAR/TZID"
3.26 +echo 'share' > "$PREFS/$CAR/freebusy_sharing"
3.27
3.28 "$RESOURCE_SCRIPT" $ARGS < $TEMPLATES/fb-request-all.txt 2>> $ERROR \
3.29 | "$SHOWMAIL" \
4.1 --- a/tests/test_outgoing_invitation.sh Thu Aug 06 01:14:20 2015 +0200
4.2 +++ b/tests/test_outgoing_invitation.sh Thu Aug 06 01:16:37 2015 +0200
4.3 @@ -77,3 +77,44 @@
4.4 && grep -q "^20141211T230000Z${TAB}20141212T230000Z" "$FBFILE" \
4.5 && echo "Success" \
4.6 || echo "Failed"
4.7 +
4.8 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-day.txt" 2>> $ERROR
4.9 +cp "$FBFILE" out8.tmp
4.10 +
4.11 + ! grep -q '^2' "$FBFILE" \
4.12 +&& echo "Success" \
4.13 +|| echo "Failed"
4.14 +
4.15 +# Switch time zones.
4.16 +
4.17 +echo 'Europe/Mariehamn' > "$PREFS/$USER/TZID"
4.18 +
4.19 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring.txt" 2>> $ERROR
4.20 +cp "$FBFILE" out9.tmp
4.21 +
4.22 + [ `cat "$FBFILE" | wc -l` = '3' ] \
4.23 +&& grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBFILE" \
4.24 +&& echo "Success" \
4.25 +|| echo "Failed"
4.26 +
4.27 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring.txt" 2>> $ERROR
4.28 +cp "$FBFILE" out10.tmp
4.29 +
4.30 + ! grep -q '^2' "$FBFILE" \
4.31 +&& echo "Success" \
4.32 +|| echo "Failed"
4.33 +
4.34 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day.txt" 2>> $ERROR
4.35 +cp "$FBFILE" out11.tmp
4.36 +
4.37 + [ `cat "$FBFILE" | wc -l` = '3' ] \
4.38 +&& grep -q "^20141211T230000Z${TAB}20141212T230000Z" "$FBFILE" \
4.39 +&& echo "Success" \
4.40 +|| echo "Failed"
4.41 +
4.42 +"$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-day.txt" 2>> $ERROR
4.43 +cp "$FBFILE" out12.tmp
4.44 +
4.45 + ! grep -q '^2' "$FBFILE" \
4.46 +&& echo "Success" \
4.47 +|| echo "Failed"
5.1 --- a/tests/test_person_invitation_recurring.sh Thu Aug 06 01:14:20 2015 +0200
5.2 +++ b/tests/test_person_invitation_recurring.sh Thu Aug 06 01:16:37 2015 +0200
5.3 @@ -140,3 +140,71 @@
5.4 ! grep -q "event8@example.com" "$FBOTHERFILE" \
5.5 && echo "Success" \
5.6 || echo "Failed"
5.7 +
5.8 +# Switch time zones.
5.9 +
5.10 +echo 'Europe/Mariehamn' > "$PREFS/$USER/TZID"
5.11 +
5.12 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-request-person-recurring.txt" 2>> $ERROR \
5.13 +| "$SHOWMAIL" \
5.14 +> out7.tmp
5.15 +
5.16 + ! grep -q 'METHOD:REPLY' out7.tmp \
5.17 +&& echo "Success" \
5.18 +|| echo "Failed"
5.19 +
5.20 + ! grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBFILE" \
5.21 +&& echo "Success" \
5.22 +|| echo "Failed"
5.23 +
5.24 + grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBOTHERFILE" \
5.25 +&& echo "Success" \
5.26 +|| echo "Failed"
5.27 +
5.28 + "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER" "event8@example.com" \
5.29 +| tee out8.tmp \
5.30 +| "$OUTGOING_SCRIPT" $ARGS
5.31 +
5.32 + grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBFILE" \
5.33 +&& echo "Success" \
5.34 +|| echo "Failed"
5.35 +
5.36 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-person-recurring.txt" 2>> $ERROR \
5.37 +| "$SHOWMAIL" \
5.38 +> out9.tmp
5.39 +
5.40 + ! grep -q 'METHOD:REPLY' out9.tmp \
5.41 +&& echo "Success" \
5.42 +|| echo "Failed"
5.43 +
5.44 + ! grep -q "event8@example.com" "$FBFILE" \
5.45 +&& echo "Success" \
5.46 +|| echo "Failed"
5.47 +
5.48 + ! grep -q "event8@example.com" "$FBOTHERFILE" \
5.49 +&& echo "Success" \
5.50 +|| echo "Failed"
5.51 +
5.52 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-request-person-recurring-day-floating.txt" 2>> $ERROR \
5.53 +| "$SHOWMAIL" \
5.54 +> out10.tmp
5.55 +
5.56 + ! grep -q 'METHOD:REPLY' out10.tmp \
5.57 +&& echo "Success" \
5.58 +|| echo "Failed"
5.59 +
5.60 + ! grep -q "^20141211T220000Z${TAB}20141212T220000Z" "$FBFILE" \
5.61 +&& echo "Success" \
5.62 +|| echo "Failed"
5.63 +
5.64 + grep -q "^20141211T220000Z${TAB}20141212T220000Z" "$FBOTHERFILE" \
5.65 +&& echo "Success" \
5.66 +|| echo "Failed"
5.67 +
5.68 + "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER" "event12@example.com" \
5.69 +| tee out11.tmp \
5.70 +| "$OUTGOING_SCRIPT" $ARGS
5.71 +
5.72 + grep -q "^20141211T220000Z${TAB}20141212T220000Z" "$FBFILE" \
5.73 +&& echo "Success" \
5.74 +|| echo "Failed"