8 if [ "$1" == "" ]; then
9 DIRS=`find TestCases -type d -name "TC_*" -maxdepth 1 | sed "s/^TestCases\///"`
10 if [ "$DIRS" == "" ] ; then
11 echo "Usage: tc <TestCase> [expected]"
12 echo " expected - create the expected response for future comparison"
21 if [ "$1" = "expected" ]; then
23 cat TestCases/$TC/[0-9]* | aafcli -i 2>&1 | tee TestCases/expected/$TC.$SUFFIX
24 elif [ -d "TestCases/$TC" ]; then
25 SUFFIX=`date "+%Y-%m-%d_%H:%M:%S"`
26 cat TestCases/$TC/[0-9]* | aafcli -i 2>&1 | tee runs/$TC.$SUFFIX > /dev/null
28 diff runs/$TC.$SUFFIX TestCases/expected/$TC.expected || failed "[$TC.$SUFFIX]"
29 echo "SUCCESS! [$TC.$SUFFIX]"