imip-agent

tests/test_person_non_participation.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 PERSON_SCRIPT="$THIS_DIR/../imip_person.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 USER="mailto:vincent.vole@example.com"    13 SENDER="mailto:paul.boddie@example.com"    14 FBFILE="$STORE/$USER/freebusy"    15 FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER"    16 TAB=`printf '\t'`    17     18 OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py"    19     20 PYTHONPATH="$THIS_DIR/.."    21 export PYTHONPATH    22     23 ACCEPT_SCRIPT="$THIS_DIR/test_handle.py"    24 ACCEPT_ARGS="accept $STORE"    25     26 DECLINE_SCRIPT="$THIS_DIR/test_handle.py"    27 DECLINE_ARGS="decline $STORE"    28     29 ERROR=err.tmp    30     31 rm -r $STORE    32 rm -r $STATIC    33 rm -r $PREFS    34 rm $ERROR    35 rm out*.tmp    36     37 mkdir -p "$PREFS/$USER"    38 echo 'no' > "$PREFS/$USER/participating"    39     40   "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/fb-request-person-all.txt" 2>> $ERROR \    41 | "$SHOWMAIL" \    42 > out0.tmp    43     44    ! grep -q 'METHOD:REPLY' out0.tmp \    45 && echo "Success" \    46 || echo "Failed"    47     48   "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-request-person.txt" 2>> $ERROR \    49 | "$SHOWMAIL" \    50 > out2.tmp    51     52    ! grep -q 'METHOD:REPLY' out2.tmp \    53 && echo "Success" \    54 || echo "Failed"    55     56    ! [ -e "$FBFILE" ] \    57 && echo "Success" \    58 || echo "Failed"    59     60    ! [ -e "$FBOTHERFILE" ] \    61 && echo "Success" \    62 || echo "Failed"    63     64   "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER" < "$TEMPLATES/event-request-person-object.txt" 2>> $ERROR \    65 | tee out3.tmp \    66 | "$OUTGOING_SCRIPT" $ARGS 2>> $ERROR    67     68    ! [ -e "$FBFILE" ] \    69 || ! grep -q "^20141126T150000Z${TAB}20141126T160000Z" "$FBFILE" \    70 && echo "Success" \    71 || echo "Failed"