*** empty log message ***
This commit is contained in:
parent
9084a6516b
commit
6e3bdf7421
19
tests/Maildir/Maildir.sh
Executable file
19
tests/Maildir/Maildir.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
topdir=`dirname $0`/..
|
||||||
|
. $topdir/shared.sh
|
||||||
|
|
||||||
|
initvariables $0
|
||||||
|
|
||||||
|
# See how many Maildir files were indexed. All Maildir messages have had
|
||||||
|
# MAILDIR_UNIQUEXXX added at the end of the 'Subject: ' line. Note that
|
||||||
|
# because of the attachments the relationship of file count to result count
|
||||||
|
# is not trivial. We do not use recollq here because any change in the
|
||||||
|
# indexing process is going to change the order of results.
|
||||||
|
|
||||||
|
xadump -d $RECOLL_CONFDIR/xapiandb -t maildir_uniquexxx -F | \
|
||||||
|
grep FreqFor > $mystdout 2> $mystderr
|
||||||
|
|
||||||
|
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1
|
||||||
|
|
||||||
|
checkresult
|
||||||
1
tests/Maildir/Maildir.txt
Normal file
1
tests/Maildir/Maildir.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
FreqFor maildir_uniquexxx : 692
|
||||||
13
tests/Maildir1/Maildir1.sh
Executable file
13
tests/Maildir1/Maildir1.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
topdir=`dirname $0`/..
|
||||||
|
. $topdir/shared.sh
|
||||||
|
|
||||||
|
initvariables $0
|
||||||
|
|
||||||
|
# This is supposed to find an html attachment
|
||||||
|
recollq '"EMI is releasing albums for download"' > $mystdout 2> $mystderr
|
||||||
|
|
||||||
|
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1
|
||||||
|
|
||||||
|
checkresult
|
||||||
3
tests/Maildir1/Maildir1.txt
Normal file
3
tests/Maildir1/Maildir1.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Recoll query: ((emi PHRASE 6 is PHRASE 6 releasing PHRASE 6 albums PHRASE 6 for PHRASE 6 download))
|
||||||
|
1 results
|
||||||
|
100% text/html 10825 bytes [file:///home/dockes/projets/fulltext/testrecoll/Maildir/a.tager/cur/1134632779.000001.mbox:2,S] [00/05/05 - Mix&Match Meeting in the Zydeco room]
|
||||||
12
tests/andor/andor.sh
Executable file
12
tests/andor/andor.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
topdir=`dirname $0`/..
|
||||||
|
. $topdir/shared.sh
|
||||||
|
|
||||||
|
initvariables $0
|
||||||
|
|
||||||
|
recollq 'Beatles OR Lennon Live OR Unplugged' > $mystdout 2> $mystderr
|
||||||
|
|
||||||
|
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1
|
||||||
|
|
||||||
|
checkresult
|
||||||
4
tests/andor/andor.txt
Normal file
4
tests/andor/andor.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Recoll query: (((beatles:(wqf=11) OR lennon:(wqf=11)) AND (live:(wqf=11) OR unplugged:(wqf=11))))
|
||||||
|
2 results
|
||||||
|
53% text/plain 18 bytes [file:///home/dockes/projets/fulltext/testrecoll/andor/bu.txt] [bu.txt]
|
||||||
|
46% text/plain 12 bytes [file:///home/dockes/projets/fulltext/testrecoll/andor/leli.txt] [leli.txt]
|
||||||
13
tests/badsuffs/badsuffs.sh
Executable file
13
tests/badsuffs/badsuffs.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
topdir=`dirname $0`/..
|
||||||
|
. $topdir/shared.sh
|
||||||
|
|
||||||
|
initvariables $0
|
||||||
|
|
||||||
|
# Data in text files with skipped suffixes should not be indexed
|
||||||
|
recollq Badsuffixes_unique > $mystdout 2> $mystderr
|
||||||
|
|
||||||
|
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1
|
||||||
|
|
||||||
|
checkresult
|
||||||
2
tests/badsuffs/badsuffs.txt
Normal file
2
tests/badsuffs/badsuffs.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Recoll query: (badsuffixes_unique:(wqf=11))
|
||||||
|
0 results
|
||||||
13
tests/badsuffs1/badsuffs1.sh
Executable file
13
tests/badsuffs1/badsuffs1.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
topdir=`dirname $0`/..
|
||||||
|
. $topdir/shared.sh
|
||||||
|
|
||||||
|
initvariables $0
|
||||||
|
|
||||||
|
# File names for files with skipped suffixes should be indexed
|
||||||
|
recollq Badsufffilename > $mystdout 2> $mystderr
|
||||||
|
|
||||||
|
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1
|
||||||
|
|
||||||
|
checkresult
|
||||||
8
tests/badsuffs1/badsuffs1.txt
Normal file
8
tests/badsuffs1/badsuffs1.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Recoll query: (badsufffilename:(wqf=11))
|
||||||
|
6 results
|
||||||
|
99% 19 bytes [file:///home/dockes/projets/fulltext/testrecoll/badsuffs/badsufffilename.tgz] [badsufffilename.tgz]
|
||||||
|
99% 19 bytes [file:///home/dockes/projets/fulltext/testrecoll/badsuffs/badsufffilename.tar.bz2] [badsufffilename.tar.bz2]
|
||||||
|
99% 19 bytes [file:///home/dockes/projets/fulltext/testrecoll/badsuffs/badsufffilename.log.gz] [badsufffilename.log.gz]
|
||||||
|
99% 19 bytes [file:///home/dockes/projets/fulltext/testrecoll/badsuffs/badsufffilename.md5] [badsufffilename.md5]
|
||||||
|
99% 19 bytes [file:///home/dockes/projets/fulltext/testrecoll/badsuffs/badsufffilename.tar.gz] [badsufffilename.tar.gz]
|
||||||
|
99% 19 bytes [file:///home/dockes/projets/fulltext/testrecoll/badsuffs/badsufffilename.tbz] [badsufffilename.tbz]
|
||||||
25
tests/runtests.sh
Normal file
25
tests/runtests.sh
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if test ! -f shared.sh ; then
|
||||||
|
echo must be run in the top test directory
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
. shared.sh
|
||||||
|
|
||||||
|
# Yes, we could/should use the $toptmp from shared.sh here, but what if
|
||||||
|
# this is unset ?
|
||||||
|
toptmp=${TMPDIR:-/tmp}/recolltsttmp
|
||||||
|
if test -d "$toptmp" ; then
|
||||||
|
rm -rf $toptmp/*
|
||||||
|
else
|
||||||
|
mkdir $toptmp || fatal cant create temp dir $toptmp
|
||||||
|
fi
|
||||||
|
|
||||||
|
dirs=`ls -F | grep / | grep -v CVS`
|
||||||
|
|
||||||
|
for dir in $dirs ; do
|
||||||
|
cd $dir
|
||||||
|
sh `basename $dir`.sh
|
||||||
|
cd ..
|
||||||
|
done
|
||||||
31
tests/shared.sh
Normal file
31
tests/shared.sh
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# @(#$Id: shared.sh,v 1.1 2007-02-14 08:16:47 dockes Exp $ (C) 2006 J.F.Dockes
|
||||||
|
|
||||||
|
# shared code and variables for all tests
|
||||||
|
|
||||||
|
RECOLL_CONFDIR=/home/dockes/projets/fulltext/testrecoll/config
|
||||||
|
export RECOLL_CONFDIR
|
||||||
|
|
||||||
|
# Call this with the script's $0 as argument
|
||||||
|
initvariables() {
|
||||||
|
toptmp=${TMPDIR:-/tmp}/recolltsttmp
|
||||||
|
myname=`basename $1 .sh`
|
||||||
|
mystderr=$toptmp/${myname}.err
|
||||||
|
mystdout=$toptmp/${myname}.out
|
||||||
|
mydiffs=$toptmp/${myname}.diffs
|
||||||
|
}
|
||||||
|
|
||||||
|
fatal () {
|
||||||
|
echo $*
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
checkresult() {
|
||||||
|
if test -s "$mydiffs" ; then
|
||||||
|
fatal $myname FAILED
|
||||||
|
else
|
||||||
|
rm -f $mydiffs
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
12
tests/skipped/skipped.sh
Executable file
12
tests/skipped/skipped.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
topdir=`dirname $0`/..
|
||||||
|
. $topdir/shared.sh
|
||||||
|
|
||||||
|
initvariables $0
|
||||||
|
|
||||||
|
recollq shouldbeSkippedUnique > $mystdout 2> $mystderr
|
||||||
|
|
||||||
|
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1
|
||||||
|
|
||||||
|
checkresult
|
||||||
3
tests/skipped/skipped.txt
Normal file
3
tests/skipped/skipped.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Recoll query: ((shouldbeskippedunique:(wqf=11) OR shouldbeskippeduniqu))
|
||||||
|
1 results
|
||||||
|
61% text/plain 48 bytes [file:///home/dockes/projets/fulltext/testrecoll/skipped/rlyskipped/shouldnotbeskipped.txt] [shouldnotbeskipped.txt]
|
||||||
Loading…
x
Reference in New Issue
Block a user