indexedmimetypes test
This commit is contained in:
parent
e327ea0b4e
commit
25ff728317
57
tests/indexedmimetypes/indexedmimetypes.sh
Normal file
57
tests/indexedmimetypes/indexedmimetypes.sh
Normal 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
|
||||||
8
tests/indexedmimetypes/indexedmimetypes.txt
Normal file
8
tests/indexedmimetypes/indexedmimetypes.txt
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user