# HG changeset patch # User Paul Boddie # Date 1457717669 -3600 # Node ID 8305a10813d277ba83b1b80b2df23db5bb764aae # Parent c57dbbd5b09ae43cf8a1c53ed044d03bb220e70a Fixed file-specific output testing. diff -r c57dbbd5b09a -r 8305a10813d2 tests/test_person_non_participation.sh --- a/tests/test_person_non_participation.sh Fri Mar 11 18:33:57 2016 +0100 +++ b/tests/test_person_non_participation.sh Fri Mar 11 18:34:29 2016 +0100 @@ -5,9 +5,6 @@ USER="mailto:vincent.vole@example.com" IMPOSTER="mailto:oliver.otter@example.com" SENDER="mailto:paul.boddie@example.com" -FBFILE="$STORE/$USER/freebusy" -FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER" -FBIMPOSTERFILE="$STORE/$SENDER/freebusy-other/$IMPOSTER" mkdir -p "$PREFS/$USER" echo 'no' > "$PREFS/$USER/participating" @@ -27,7 +24,10 @@ "$OUTGOING_SCRIPT" < "$TEMPLATES/event-request-person.txt" $ARGS 2>> $ERROR - [ -e "$STORE/$SENDER/objects/event6@example.com" ] \ + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "object" "event6@example.com" \ +> out0O.tmp + + grep -q "event6@example.com" "out0O.tmp" \ && echo "Success" \ || echo "Failed" @@ -41,11 +41,17 @@ && echo "Success" \ || echo "Failed" - ! [ -e "$FBFILE" ] \ + "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \ +> out2f.tmp + + ! grep -q "event6@example.com" "out2f.tmp" \ && echo "Success" \ || echo "Failed" - ! [ -e "$FBOTHERFILE" ] \ + "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy_other" "$SENDER" \ +> out2s.tmp + + ! grep -q "event6@example.com" "out2s.tmp" \ && echo "Success" \ || echo "Failed" @@ -55,8 +61,10 @@ | tee out3.tmp \ | "$OUTGOING_SCRIPT" $ARGS 2>> $ERROR - ! [ -e "$FBFILE" ] \ -|| ! grep -q "^20141126T150000Z${TAB}20141126T160000Z" "$FBFILE" \ + "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \ +> out2f.tmp + + ! grep -q "^20141126T150000Z${TAB}20141126T160000Z" "out2f.tmp" \ && echo "Success" \ || echo "Failed" @@ -68,12 +76,16 @@ | "$SHOWMAIL" \ > out5.tmp - [ -e "$STORE/$SENDER/objects/event6@example.com" ] \ -&& ! grep -q "otter" "$STORE/$SENDER/objects/event6@example.com" \ + "$LIST_SCRIPT" $LIST_ARGS "$USER" "object" "event6@example.com" \ +> out5O.tmp + + ! grep -q "otter" "out5O.tmp" \ && echo "Success" \ || echo "Failed" - ( ! [ -e "$FBIMPOSTERFILE" ] \ - || ! grep -q "^20141126T150000Z${TAB}20141126T160000Z" "$FBIMPOSTERFILE") \ + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy_other" "$IMPOSTER" \ +> out5s.tmp + + ! grep -q "^20141126T150000Z${TAB}20141126T160000Z" "out5s.tmp" \ && echo "Success" \ || echo "Failed"