#! /bin/sh
##
#	Text to Doc converter for Palm Pilots
#	test-sh
#
#	Copyright (C) 2001  Paul J. Lucas
#
#	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.
##

ROOT=txt2pdbdoc

ORIG_TXT=$ROOT.c
TEMP_PDB=/tmp/$ROOT-pdb.$$
TEMP_TXT=/tmp/$ROOT-txt.$$

trap 'x=$?; rm -f /tmp/$ROOT-*.$$; exit $x' 0 1 2 15

##
# Convert some text file to a Doc file and back again and compare it to the
# original file.
##
./txt2pdbdoc $ORIG_TXT $ORIG_TXT $TEMP_PDB
./txt2pdbdoc -d $TEMP_PDB $TEMP_TXT
diff $ORIG_TXT $TEMP_TXT >/dev/null 2>/dev/null
