#!/bin/sh -e
../src/dbus-test-runner --dbus-config ../../tests/../data/session.conf --task cat --parameter "../../src/dbus-test-runner.c" --task-name "cat1" --task cat --parameter "../../src/dbus-test-runner.c" --task-name "cat2" > testcat.output.txt
echo Finding cat1 data
grep ^cat1: testcat.output.txt | tail -n +2 | head -n -1 > testcat.output.cat1.txt
echo Finding cat2 data
grep ^cat2: testcat.output.txt | tail -n +2 | head -n -1 > testcat.output.cat2.txt
echo Filtering cat1 data
sed -e s/cat1:\ //g testcat.output.cat1.txt > testcat.output.cat1.filtered.txt
echo Filtering cat2 data
sed -e s/cat2:\ //g testcat.output.cat2.txt > testcat.output.cat2.filtered.txt
echo Verifying cat 1
diff testcat.output.cat1.filtered.txt "../../src/dbus-test-runner.c" > /dev/null
echo Verifying cat 2
diff testcat.output.cat2.filtered.txt "../../src/dbus-test-runner.c" > /dev/null
