#!/bin/sh
#
# html input

: ${srcdir=.}

failures=0

# near separated by paragraph
match=`${BOOL} 'ffff NEAR gggg' doc.html`
if test -n "$match" ; then
  echo "Test #1 failed"
  failures=1
fi

# pattern in bold context
match=`${BOOL} 'iii' doc.html`
if test "$match" != "gggg hhh iii jj" ; then
  echo "Test #2 failed"
  failures=1
fi

# near match containing bold
match=`${BOOL} 'gg near jj' doc.html`
if test "$match" != "gggg hhh iii jj" ; then
  echo "Test #3 failed"
  failures=1
fi

exit $failures
