clean() {
	cd ../Tests/
	./clean
	cd ../Source
}

clear

clean

# set mono path to support using the Cobra.Lang.dll in this directory
export MONO_PATH="`pwd`:$MONO_PATH"

if [ -f r-testify ]; then
	mv r-testify r-testify-last
fi
mono --debug cobra.exe -testify $*
exitCode=$?
if [ $exitCode -ne 0 ]; then
	echo '"cobra -testify" exited with error code' $exitCode
	edit r-testify
	exit 1
fi
clean
edit r-testify
