imip-agent

tests/test_multiple_invitation.sh

789:c90e7281106d
2015-09-29 Paul Boddie Added missing escaping for text within elements.
     1 #!/bin/sh     2      3 THIS_DIR=`dirname $0`     4      5 TEMPLATES="$THIS_DIR/templates"     6 RESOURCE_SCRIPT="$THIS_DIR/../imip_resource.py"     7 SHOWMAIL="$THIS_DIR/../tools/showmail.py"     8 STORE=/tmp/store     9 STATIC=/tmp/static    10 PREFS=/tmp/prefs    11 ARGS="-S $STORE -P $STATIC -p $PREFS -d"    12 ROOM="mailto:resource-room-confroom@example.com"    13 CAR="mailto:resource-car-porsche911@example.com"    14 ERROR=err.tmp    15     16 rm -r $STORE    17 rm -r $STATIC    18 rm -r $PREFS    19 rm $ERROR    20 rm out*.tmp    21     22 mkdir -p "$PREFS/$ROOM"    23 echo 'Europe/Oslo' > "$PREFS/$ROOM/TZID"    24 echo 'share' > "$PREFS/$ROOM/freebusy_sharing"    25     26 mkdir -p "$PREFS/$CAR"    27 echo 'Europe/Mariehamn' > "$PREFS/$CAR/TZID"    28 echo 'share' > "$PREFS/$CAR/freebusy_sharing"    29     30   "$RESOURCE_SCRIPT" $ARGS < $TEMPLATES/fb-request-all.txt 2>> $ERROR \    31 | "$SHOWMAIL" \    32 > out0.tmp    33     34    grep -q 'METHOD:REPLY' out0.tmp \    35 && ! grep -q '^FREEBUSY' out0.tmp \    36 && echo "Success" \    37 || echo "Failed"    38     39   "$RESOURCE_SCRIPT" $ARGS < $TEMPLATES/fb-request.txt 2>> $ERROR \    40 | "$SHOWMAIL" \    41 > out1.tmp    42     43    grep -q 'METHOD:REPLY' out1.tmp \    44 && ! grep -q '^FREEBUSY' out1.tmp \    45 && echo "Success" \    46 || echo "Failed"    47     48   "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/event-request-multiple.txt" 2>> $ERROR \    49 | "$SHOWMAIL" \    50 > out2.tmp    51     52    grep -q 'METHOD:REPLY' out2.tmp \    53 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out2.tmp \    54 && echo "Success" \    55 || echo "Failed"    56     57   "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/event-request-multiple.txt" 2>> $ERROR \    58 | "$SHOWMAIL" \    59 > out3.tmp    60     61    grep -q 'METHOD:REPLY' out3.tmp \    62 && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out3.tmp \    63 && echo "Success" \    64 || echo "Failed"    65     66   "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/fb-request.txt" 2>> $ERROR \    67 | "$SHOWMAIL" \    68 > out4.tmp    69     70    grep -q 'METHOD:REPLY' out4.tmp \    71 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out4.tmp \    72 && echo "Success" \    73 || echo "Failed"    74     75   "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/fb-request-car.txt" 2>> $ERROR \    76 | "$SHOWMAIL" \    77 > out5.tmp    78     79    grep -q 'METHOD:REPLY' out5.tmp \    80 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out5.tmp \    81 && echo "Success" \    82 || echo "Failed"    83     84 "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-multiple-attendee.txt" 2>> $ERROR    85 echo "Cancel..."    86     87   "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/fb-request.txt" 2>> $ERROR \    88 | "$SHOWMAIL" \    89 > out6.tmp    90     91    grep -q 'METHOD:REPLY' out6.tmp \    92 && ! grep -q '^FREEBUSY' out6.tmp \    93 && echo "Success" \    94 || echo "Failed"    95     96   "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/fb-request-car.txt" 2>> $ERROR \    97 | "$SHOWMAIL" \    98 > out7.tmp    99    100    grep -q 'METHOD:REPLY' out7.tmp \   101 && grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out7.tmp \   102 && echo "Success" \   103 || echo "Failed"