#!/bin/bash
########################################################################
# File: test.bash
# 	(Extracted from
#	   "$Id: test.bash,v 1.2 2009/05/30 20:27:19 maoyam Exp maoyam $")
#
# Abstracts:
#  This bash script tests the fair_copy API.
#
# Copyright (C) 2004-2007 Maoyam Tokyo, Japan (mailto:maoyam@mail.goo.ne.jp)
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
########################################################################

for f in README.SCO					\
	hundred-LF-and-7-letter.txt		\
	hundred-LF-and-7-letter.txt.dos	\
	hundred-LF-and-7-letter.txt.mac	\
	new-line-at-eleventh.txt		\
	no-new-line-at-eleventh.txt		\
	no-new-line-at-eleventh-EOF.txt	\
	zero-size-file.txt				\
	eleven-new-lines.txt			\
	ten-new-lines.txt				\
	full-buffer.txt					\
	overflow.txt					\
	tab-line.txt					\
	short-line.txt					\
	one-line-filled.txt				\
	too-long-word.txt				\
	two-line-last-word-long.txt		\
	last-is-period.txt				\
	three-numbers.txt				\
	three-numbers.txt.dos			\
	three-numbers.txt.mac			\
	;
do # {
	echo "<<< ${f} >>>";
	od -xc ${f};
	echo "--------->";
##	cp -p ${f} test.txt;
	./fair_copy ${f};
	echo "--------->";
##	od -xc test.out.txt;
	echo "";
done; # }

rm test.out.txt

exit 0;
