1 #!/bin/sh 2 3 . "`dirname \"$0\"`/common.sh" 4 5 USER="mailto:paul.boddie@example.com" 6 FBFILE="$STORE/$USER/freebusy" 7 8 mkdir -p "$PREFS/$USER" 9 echo 'Europe/Oslo' > "$PREFS/$USER/TZID" 10 echo 'share' > "$PREFS/$USER/freebusy_sharing" 11 12 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request.txt" 2>> $ERROR 13 cp "$FBFILE" out1.tmp 14 15 grep -q "^20141126T150000Z${TAB}20141126T160000Z" "$FBFILE" \ 16 && echo "Success" \ 17 || echo "Failed" 18 19 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel.txt" 2>> $ERROR 20 echo "Cancel..." 21 cp "$FBFILE" out2.tmp 22 23 ! grep -q '^2' "$FBFILE" \ 24 && echo "Success" \ 25 || echo "Failed" 26 27 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring.txt" 2>> $ERROR 28 cp "$FBFILE" out3.tmp 29 30 [ `cat "$FBFILE" | wc -l` = '3' ] \ 31 && grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBFILE" \ 32 && echo "Success" \ 33 || echo "Failed" 34 35 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-instance.txt" 2>> $ERROR 36 cp "$FBFILE" out4.tmp 37 38 [ `cat "$FBFILE" | wc -l` = '2' ] \ 39 && ! grep -q "^20141114T090000Z${TAB}20141114T100000Z" "$FBFILE" \ 40 && echo "Success" \ 41 || echo "Failed" 42 43 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-reschedule-instance.txt" 2>> $ERROR 44 cp "$FBFILE" out5.tmp 45 46 grep -q "^20141011T080000Z${TAB}20141011T090000Z" "$FBFILE" \ 47 && ! grep -q "^20141010T090000Z${TAB}20141010T100000Z" "$FBFILE" \ 48 && echo "Success" \ 49 || echo "Failed" 50 51 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring.txt" 2>> $ERROR 52 cp "$FBFILE" out6.tmp 53 54 ! grep -q '^2' "$FBFILE" \ 55 && echo "Success" \ 56 || echo "Failed" 57 58 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day.txt" 2>> $ERROR 59 cp "$FBFILE" out7.tmp 60 61 [ `cat "$FBFILE" | wc -l` = '3' ] \ 62 && grep -q "^20141211T230000Z${TAB}20141212T230000Z" "$FBFILE" \ 63 && echo "Success" \ 64 || echo "Failed" 65 66 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-day.txt" 2>> $ERROR 67 cp "$FBFILE" out8.tmp 68 69 ! grep -q '^2' "$FBFILE" \ 70 && echo "Success" \ 71 || echo "Failed" 72 73 # Switch time zones. 74 75 echo 'Europe/Mariehamn' > "$PREFS/$USER/TZID" 76 77 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring.txt" 2>> $ERROR 78 cp "$FBFILE" out9.tmp 79 80 [ `cat "$FBFILE" | wc -l` = '3' ] \ 81 && grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBFILE" \ 82 && echo "Success" \ 83 || echo "Failed" 84 85 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring.txt" 2>> $ERROR 86 cp "$FBFILE" out10.tmp 87 88 ! grep -q '^2' "$FBFILE" \ 89 && echo "Success" \ 90 || echo "Failed" 91 92 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day.txt" 2>> $ERROR 93 cp "$FBFILE" out11.tmp 94 95 [ `cat "$FBFILE" | wc -l` = '3' ] \ 96 && grep -q "^20141211T230000Z${TAB}20141212T230000Z" "$FBFILE" \ 97 && echo "Success" \ 98 || echo "Failed" 99 100 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-day.txt" 2>> $ERROR 101 cp "$FBFILE" out12.tmp 102 103 ! grep -q '^2' "$FBFILE" \ 104 && echo "Success" \ 105 || echo "Failed"