#!/bin/sh

DIR=configfiles/
FILENAMES="
shouldFail1.conf
shouldFail2.conf
shouldFail3.conf
shouldFail4.conf
shouldFail5.conf
shouldFail6.conf
"

if test ! -f "../swirc"; then
	echo "error: no swirc executable"
	exit 1
fi

for file in $FILENAMES; do
	printf "%b----------%b"\
	    "\033[1;30m"\
	    "\033[0m"
	printf " %b${DIR}${file}%b " "\033[1;32m" "\033[0m"
	printf "%b----------%b"\
	    "\033[1;30m"\
	    "\033[0m"
	echo ""

	if test -f "${DIR}${file}"; then
		head -1 "${DIR}${file}"
		../swirc -x "${DIR}${file}"
	else
		echo "error: nonexistent"
	fi
done
