#!/bin/sh

echo -n $0: 'Longest match... '

cat >test.in <<eof
Checking for longest match in phrases.
eof

cat >test.db <<eof
 longest
 longest match	use this
eof

cat >test.ref <<eof
test.in:1.1-1.38: Checking for [longest match] in phrases.

1 phrase in 1 sentence found.
eof

sh ./test/rundiction -f test.db test.in >test.data

if cmp test.ref test.data
then
  rm -f test.*
  echo passed
else
  echo failed
  exit 1
fi
