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