#!/bin/sh -x

### run from src /subdirectory

### setup (one time)
# cd ..
# make -s distclean
# ./configure --enable-transactions --quiet
#make -s all
### end of setup

echo "###### t.DB_PAGE_NOTFOUND.sh begins ######"

rm -rf bogodir
mkdir bogodir

./bogoutil -l bogodir/wordlist.db < /dev/null

rm bogodir/wordlist.db
./bogofilter -xd -C -n -d bogodir/ -M -B ./tests/inputs/good.mbx

### The following command can be run from the command line or
### the equivalent put into .gdbinit

#./bogofilter -xd -C -s -d bogodir/ -M -B ./tests/inputs/spam.mbx

echo "###### t.DB_PAGE_NOTFOUND.sh done ######"

### And this is the result either way
#bogofilter: (db) DB->get(TXN=134689880,  '.MSG_COUNT' ), err: DB_PAGE_NOTFOUND: Requested page not found
