#!/bin/sh
# $Id$
# Check that each demo listed in $PTII/ptolemy/configs/doc/completeDemos.htm has a corresponding test

configDir="$PTII/ptolemy/configs/doc"
demos=`cd $PTII/ptolemy/configs/doc; make listDemos`
for demo in $demos
do
    testFile1=`echo $demo | sed 's@/demo/[^/]*/@/test/auto/@'`
    #echo "1: $testFile1"
    if [ ! -f "$configDir/$testFile1" ]; then
        testFile2=`echo $testFile1 | sed 's@\.xml$@Test.xml@'`
	#echo "2: $testFile2"
	if [ ! -f "$configDir/$testFile2" ]; then
	    # $PTII/ptolemy/demo/test
	    testFile3=`echo $demo | sed 's@/demo/[^/]*/@/demo/test/auto/@'`
	    #echo "3: $testFile3"
	    if [ ! -f "$configDir/$testFile3" ]; then
		echo "$demo"
	    fi	
	fi
    fi	
done
