paul@565 | 1 | #!/bin/sh |
paul@565 | 2 | |
paul@1024 | 3 | . "`dirname \"$0\"`/common.sh" |
paul@565 | 4 | |
paul@640 | 5 | USER="mailto:resource-room-confroom@example.com" |
paul@565 | 6 | |
paul@640 | 7 | mkdir -p "$PREFS/$USER" |
paul@640 | 8 | echo 'Europe/Oslo' > "$PREFS/$USER/TZID" |
paul@640 | 9 | echo 'share' > "$PREFS/$USER/freebusy_sharing" |
paul@640 | 10 | |
paul@602 | 11 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \ |
paul@585 | 12 | | "$SHOWMAIL" \ |
paul@568 | 13 | > out0.tmp |
paul@568 | 14 | |
paul@568 | 15 | grep -q 'METHOD:REPLY' out0.tmp \ |
paul@575 | 16 | && ! grep -q '^FREEBUSY' out0.tmp \ |
paul@568 | 17 | && echo "Success" \ |
paul@568 | 18 | || echo "Failed" |
paul@568 | 19 | |
paul@602 | 20 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request.txt" 2>> $ERROR \ |
paul@585 | 21 | | "$SHOWMAIL" \ |
paul@565 | 22 | > out1.tmp |
paul@565 | 23 | |
paul@565 | 24 | grep -q 'METHOD:REPLY' out1.tmp \ |
paul@575 | 25 | && ! grep -q '^FREEBUSY' out1.tmp \ |
paul@565 | 26 | && echo "Success" \ |
paul@565 | 27 | || echo "Failed" |
paul@565 | 28 | |
paul@602 | 29 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request.txt" 2>> $ERROR \ |
paul@585 | 30 | | "$SHOWMAIL" \ |
paul@565 | 31 | > out2.tmp |
paul@565 | 32 | |
paul@565 | 33 | grep -q 'METHOD:REPLY' out2.tmp \ |
paul@565 | 34 | && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out2.tmp \ |
paul@565 | 35 | && echo "Success" \ |
paul@565 | 36 | || echo "Failed" |
paul@565 | 37 | |
paul@602 | 38 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request.txt" 2>> $ERROR \ |
paul@585 | 39 | | "$SHOWMAIL" \ |
paul@565 | 40 | > out3.tmp |
paul@565 | 41 | |
paul@565 | 42 | grep -q 'METHOD:REPLY' out3.tmp \ |
paul@565 | 43 | && grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out3.tmp \ |
paul@565 | 44 | && echo "Success" \ |
paul@565 | 45 | || echo "Failed" |
paul@565 | 46 | |
paul@602 | 47 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-conflict.txt" 2>> $ERROR \ |
paul@585 | 48 | | "$SHOWMAIL" \ |
paul@565 | 49 | > out4.tmp |
paul@565 | 50 | |
paul@565 | 51 | grep -q 'METHOD:REPLY' out4.tmp \ |
paul@565 | 52 | && grep -q 'ATTENDEE;PARTSTAT=DECLINED' out4.tmp \ |
paul@565 | 53 | && echo "Success" \ |
paul@565 | 54 | || echo "Failed" |
paul@566 | 55 | |
paul@615 | 56 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-conflict-utc.txt" 2>> $ERROR \ |
paul@585 | 57 | | "$SHOWMAIL" \ |
paul@566 | 58 | > out5.tmp |
paul@566 | 59 | |
paul@566 | 60 | grep -q 'METHOD:REPLY' out5.tmp \ |
paul@615 | 61 | && grep -q 'ATTENDEE;PARTSTAT=DECLINED' out5.tmp \ |
paul@615 | 62 | && echo "Success" \ |
paul@615 | 63 | || echo "Failed" |
paul@615 | 64 | |
paul@615 | 65 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request.txt" 2>> $ERROR \ |
paul@615 | 66 | | "$SHOWMAIL" \ |
paul@615 | 67 | > out6.tmp |
paul@615 | 68 | |
paul@615 | 69 | grep -q 'METHOD:REPLY' out6.tmp \ |
paul@615 | 70 | && grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out6.tmp \ |
paul@615 | 71 | && [ `grep 'FREEBUSY;FBTYPE=BUSY' out6.tmp | wc -l` = '1' ] \ |
paul@566 | 72 | && echo "Success" \ |
paul@566 | 73 | || echo "Failed" |
paul@566 | 74 | |
paul@602 | 75 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel.txt" 2>> $ERROR |
paul@570 | 76 | echo "Cancel..." |
paul@566 | 77 | |
paul@602 | 78 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request.txt" 2>> $ERROR \ |
paul@585 | 79 | | "$SHOWMAIL" \ |
paul@615 | 80 | > out7.tmp |
paul@566 | 81 | |
paul@615 | 82 | grep -q 'METHOD:REPLY' out7.tmp \ |
paul@615 | 83 | && ! grep -q '^FREEBUSY' out7.tmp \ |
paul@566 | 84 | && echo "Success" \ |
paul@566 | 85 | || echo "Failed" |
paul@568 | 86 | |
paul@602 | 87 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-spoofed.txt" 2>> $ERROR |
paul@570 | 88 | echo "Spoof..." |
paul@568 | 89 | |
paul@602 | 90 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \ |
paul@585 | 91 | | "$SHOWMAIL" \ |
paul@615 | 92 | > out8.tmp |
paul@568 | 93 | |
paul@615 | 94 | grep -q 'METHOD:REPLY' out8.tmp \ |
paul@615 | 95 | && ! grep -q '^FREEBUSY' out8.tmp \ |
paul@570 | 96 | && echo "Success" \ |
paul@570 | 97 | || echo "Failed" |