indexedmimetypes test

This commit is contained in:
Jean-Francois Dockes 2010-09-13 16:02:06 +02:00
parent e327ea0b4e
commit 25ff728317
2 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,57 @@
#!/bin/sh
topdir=`dirname $0`/..
. $topdir/shared.sh
initvariables $0
RECOLL_CONFDIR=$topdir/$myname
export RECOLL_CONFDIR
logfilename=$toptmp/$myname.log
sharedconf() {
cat > recoll.conf <<EOF
topdirs = $tstdata/html $tstdata/txt
logfilename=$logfilename
loglevel = 6
EOF
}
###########
# End boilerplate
sharedconf
cat >> recoll.conf <<EOF
indexedmimetypes = text/plain
indexallfilenames = 0
EOF
recollindex -z
(
# text files are indexed
recollq shorty
# html ones are not (not even the names)
recollq qtextedit
) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout
sharedconf
cat >> recoll.conf <<EOF
indexedmimetypes = text/plain
indexallfilenames = 1
EOF
recollindex -z
(
# text files are indexed
recollq shorty
# html ones are not (but the names are)
recollq qtextedit
recollq template
) 2> $mystderr | egrep -v '^Recoll query: ' >> $mystdout
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1
checkresult

View File

@ -0,0 +1,8 @@
1 results
text/plain [file:///home/dockes/projets/fulltext/testrecoll/txt/liste.txt] [liste.txt] 1182 bytes
0 results
1 results
text/plain [file:///home/dockes/projets/fulltext/testrecoll/txt/liste.txt] [liste.txt] 1182 bytes
1 results
text/html [file:///home/dockes/projets/fulltext/testrecoll/html/qtextedit.html] [qtextedit.html] 108921 bytes
0 results