added a few case and diacritics sensitivity test cases
This commit is contained in:
parent
eeb014077f
commit
4812965693
63
tests/casediac/casediac.sh
Normal file
63
tests/casediac/casediac.sh
Normal file
@ -0,0 +1,63 @@
|
||||
#!/bin/sh
|
||||
# Case and diacritics sensitivity testing
|
||||
# We use a separate configuration for this.
|
||||
# This file is encoded in UTF-8: accentué
|
||||
|
||||
LANG=en_US.UTF-8
|
||||
export LANG
|
||||
|
||||
topdir=`dirname $0`/..
|
||||
. $topdir/shared.sh
|
||||
|
||||
initvariables $0
|
||||
|
||||
RECOLL_CONFDIR=$topdir/casediac
|
||||
export RECOLL_CONFDIR
|
||||
|
||||
cat > $RECOLL_CONFDIR/recoll.conf <<EOF
|
||||
loglevel = 6
|
||||
logfilename = /tmp/logrcltst
|
||||
|
||||
daemloglevel = 6
|
||||
daemlogfilename = /tmp/rclmontrace
|
||||
|
||||
indexStripChars = 0
|
||||
|
||||
topdirs = $tstdata/casediac
|
||||
indexstemminglanguages = french
|
||||
|
||||
EOF
|
||||
|
||||
recollindex -z
|
||||
|
||||
(
|
||||
set -x
|
||||
# Diac-sensitive search for existing term
|
||||
recollq -s french éviter
|
||||
# Diac-sensitive searches for non-existing terms
|
||||
recollq -s french èviter
|
||||
recollq -s french '"eviter"D'
|
||||
# Diac-unsensitive search
|
||||
recollq -s french eviter
|
||||
# Search for stem-existing term (has to be unsensitive)
|
||||
recollq -s french evite
|
||||
# Search for stem-existing term with disabled stemming
|
||||
recollq -s french Evite
|
||||
# Case-sensitive, existing and non existing
|
||||
recollq -s french MAJUSCULESXX
|
||||
recollq -s french MAjUSCULESXX
|
||||
# Case-unsensitive
|
||||
recollq -s french majusculesxx
|
||||
# Case-unsensitive
|
||||
recollq -s french Majusculesxx
|
||||
# Case sensitive, term does not exist
|
||||
recollq -s french '"Majusculesxx"C'
|
||||
|
||||
) 2>&1 | egrep -v '^Recoll query: ' > $mystdout
|
||||
|
||||
cd $RECOLL_CONFDIR
|
||||
rm -rf history idxstatus.txt index.pid missing recoll.conf xapiandb/
|
||||
|
||||
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1
|
||||
checkresult
|
||||
|
||||
30
tests/casediac/casediac.txt
Normal file
30
tests/casediac/casediac.txt
Normal file
@ -0,0 +1,30 @@
|
||||
+ recollq -s french éviter
|
||||
1 results
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/casediac/testfile.html] [testfile.html] 140 bytes
|
||||
+ recollq -s french èviter
|
||||
0 results
|
||||
+ recollq -s french '"eviter"D'
|
||||
0 results
|
||||
+ recollq -s french eviter
|
||||
1 results
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/casediac/testfile.html] [testfile.html] 140 bytes
|
||||
+ recollq -s french evite
|
||||
1 results
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/casediac/testfile.html] [testfile.html] 140 bytes
|
||||
+ recollq -s french Evite
|
||||
0 results
|
||||
+ recollq -s french MAJUSCULESXX
|
||||
1 results
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/casediac/testfile.html] [testfile.html] 140 bytes
|
||||
+ recollq -s french MAjUSCULESXX
|
||||
0 results
|
||||
+ recollq -s french majusculesxx
|
||||
2 results
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/casediac/testfile1.html] [testfile1.html] 132 bytes
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/casediac/testfile.html] [testfile.html] 140 bytes
|
||||
+ recollq -s french Majusculesxx
|
||||
2 results
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/casediac/testfile1.html] [testfile1.html] 132 bytes
|
||||
text/html [file:///home/dockes/projets/fulltext/testrecoll/casediac/testfile.html] [testfile.html] 140 bytes
|
||||
+ recollq -s french '"Majusculesxx"C'
|
||||
0 results
|
||||
Loading…
x
Reference in New Issue
Block a user