1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/outgoing_invitation.sh Tue May 19 21:47:59 2015 +0200
1.3 @@ -0,0 +1,56 @@
1.4 +#!/bin/sh
1.5 +
1.6 +THIS_DIR=`dirname $0`
1.7 +
1.8 +TEMPLATES=$THIS_DIR/templates
1.9 +OUTGOING_SCRIPT=$THIS_DIR/../imip_person_outgoing.py
1.10 +SHOWMAIL=$THIS_DIR/../tools/showmail.py
1.11 +STORE=/tmp/store
1.12 +STATIC=/tmp/static
1.13 +ARGS="-S $STORE -P $STATIC -d"
1.14 +USER="mailto:paul.boddie@example.com"
1.15 +FBFILE="$STORE/$USER/freebusy"
1.16 +TAB=`printf '\t'`
1.17 +
1.18 +rm -r $STORE
1.19 +rm -r $STATIC
1.20 +
1.21 +$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-request.txt 2> /dev/null
1.22 +
1.23 + grep -q "^20141126T150000Z${TAB}20141126T160000Z" "$FBFILE" \
1.24 +&& echo "Success" \
1.25 +|| echo "Failed"
1.26 +
1.27 +$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-cancel.txt 2> /dev/null
1.28 +echo "Cancel..."
1.29 +
1.30 + ! grep -q '^FREEBUSY' "$FBFILE" \
1.31 +&& echo "Success" \
1.32 +|| echo "Failed"
1.33 +
1.34 +$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-request-recurring.txt 2> /dev/null
1.35 +
1.36 + [ `cat "$FBFILE" | wc -l` = '3' ] \
1.37 +&& grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBFILE" \
1.38 +&& echo "Success" \
1.39 +|| echo "Failed"
1.40 +
1.41 +$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-cancel-recurring-instance.txt 2> /dev/null
1.42 +
1.43 + [ `cat "$FBFILE" | wc -l` = '2' ] \
1.44 +&& ! grep -q "^20141114T090000Z${TAB}20141114T100000Z" "$FBFILE" \
1.45 +&& echo "Success" \
1.46 +|| echo "Failed"
1.47 +
1.48 +$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-request-recurring-reschedule-instance.txt 2> /dev/null
1.49 +
1.50 + grep -q "^20141011T080000Z${TAB}20141011T090000Z" "$FBFILE" \
1.51 +&& ! grep -q "^20141010T090000Z${TAB}20141010T100000Z" "$FBFILE" \
1.52 +&& echo "Success" \
1.53 +|| echo "Failed"
1.54 +
1.55 +$OUTGOING_SCRIPT $ARGS < $TEMPLATES/event-cancel-recurring.txt 2> /dev/null
1.56 +
1.57 + ! grep -q '^FREEBUSY' "$FBFILE" \
1.58 +&& echo "Success" \
1.59 +|| echo "Failed"
2.1 --- a/tests/templates/event-cancel.txt Tue May 19 19:56:55 2015 +0200
2.2 +++ b/tests/templates/event-cancel.txt Tue May 19 21:47:59 2015 +0200
2.3 @@ -20,6 +20,7 @@
2.4 VERSION:2.0
2.5 BEGIN:VEVENT
2.6 ORGANIZER:mailto:paul.boddie@example.com
2.7 +ATTENDEE;RSVP=TRUE:mailto:paul.boddie@example.com
2.8 ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com
2.9 DTSTAMP:20141125T004600Z
2.10 DTSTART;TZID=Europe/Oslo:20141126T160000