#
# Part of the ht://Dig package   <http://www.htdig.org/>
# Copyright (c) 1999, 2000, 2001 The ht://Dig Group
# For copyright details, see the file COPYING in your distribution
# or the GNU General Public License version 2 or later
# <http://www.gnu.org/copyleft/gpl.html>
#
# $Id: t_dict,v 1.5 2001/06/29 14:14:08 loic Exp $
#

. ./test_functions

export MIFLUZ_CONFIG ; MIFLUZ_CONFIG=${srcdir}/mifluz-dict.conf
../htdb/mifluzload $VERBOSE test < $srcdir/dict.txt
chmod a-w test 
#
# Complete dictionary dump
#
a=`../htdb/mifluzdict test | cut -d' ' -f1,3`
b="an 1
comes 1
dog 6
end 1
lazy 8
the 9
to 1
world 8"
if [ "$a" != "$b" ]
then
	echo "expected
$b
but got
$a" >&2
	exit 1
fi

#
# Dump entries starting with prefix
#
a=`../htdb/mifluzdict -p t test | cut -d' ' -f1,3`
b="the 9
to 1"
if [ "$a" != "$b" ]
then
	echo "expected
$b
but got
$a" >&2
	exit 1
fi
