tests: make it easier to move to other machine by sorting on url and other small changes

This commit is contained in:
Jean-Francois Dockes 2014-07-23 10:23:03 +02:00
parent a9e43ad950
commit 957bc1a11c
10 changed files with 34 additions and 40 deletions

View file

@ -4,12 +4,9 @@ topdir=`dirname $0`/..
. $topdir/shared.sh . $topdir/shared.sh
initvariables $0 initvariables $0
(
for q in xing;do
echo $q
recollq -q $q
done
(
recollq -S url -q xing dir:embed
) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout ) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1 diff -w ${myname}.txt $mystdout > $mydiffs 2>&1

View file

@ -1,5 +1,2 @@
xing 1 results
3 results
message/rfc822 [file:///home/dockes/projets/fulltext/testrecoll/mail/outmail] [video+recdat] 1027 bytes
application/msword [file:///home/dockes/projets/fulltext/testrecoll/msword/xingfx1.doc] [xingfx1.doc] 24576 bytes
application/msword [file:///home/dockes/projets/fulltext/testrecoll/embed/thunderbirdlocalfolders.zip] [xingfx1.doc] 24576 bytes application/msword [file:///home/dockes/projets/fulltext/testrecoll/embed/thunderbirdlocalfolders.zip] [xingfx1.doc] 24576 bytes

View file

@ -6,9 +6,9 @@ topdir=`dirname $0`/..
initvariables $0 initvariables $0
( (
recollq -S mtime 'Bienvenue Dans Univers De Lyx' recollq -S url 'Bienvenue Dans Univers De Lyx'
recollq -S mtime 'Welcome To Lyx' recollq -S url 'Welcome To Lyx'
recollq -S mtime 'LyX jol dokumentalt' recollq -S url 'LyX jol dokumentalt'
) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout ) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1 diff -w ${myname}.txt $mystdout > $mydiffs 2>&1

View file

@ -2,7 +2,7 @@
application/x-lyx [file:///home/dockes/projets/fulltext/testrecoll/lyx/accentué.lyx] [accentué.lyx] 3577 bytes application/x-lyx [file:///home/dockes/projets/fulltext/testrecoll/lyx/accentué.lyx] [accentué.lyx] 3577 bytes
application/x-lyx [file:///home/dockes/projets/fulltext/testrecoll/lyx/fr_splash.lyx] [fr_splash.lyx] 3577 bytes application/x-lyx [file:///home/dockes/projets/fulltext/testrecoll/lyx/fr_splash.lyx] [fr_splash.lyx] 3577 bytes
2 results 2 results
application/x-lyx [file:///home/dockes/projets/fulltext/testrecoll/lyx/with spaces.lyx] [with spaces.lyx] 2974 bytes
application/x-lyx [file:///home/dockes/projets/fulltext/testrecoll/lyx/splash.lyx] [splash.lyx] 2974 bytes application/x-lyx [file:///home/dockes/projets/fulltext/testrecoll/lyx/splash.lyx] [splash.lyx] 2974 bytes
application/x-lyx [file:///home/dockes/projets/fulltext/testrecoll/lyx/with spaces.lyx] [with spaces.lyx] 2974 bytes
1 results 1 results
application/x-lyx [file:///home/dockes/projets/fulltext/testrecoll/lyx/hu_splash.lyx] [hu_splash.lyx] 4773 bytes application/x-lyx [file:///home/dockes/projets/fulltext/testrecoll/lyx/hu_splash.lyx] [hu_splash.lyx] 4773 bytes

View file

@ -6,8 +6,8 @@ topdir=`dirname $0`/..
initvariables $0 initvariables $0
( (
recollq '"Evenements et programme 2006"' recollq -S url '"Evenements et programme 2006"'
recollq 'pcx11 manuel de programmation iamactuallyanrtf' recollq -S url 'pcx11 manuel de programmation iamactuallyanrtf'
) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout ) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1 diff -w ${myname}.txt $mystdout > $mydiffs 2>&1

View file

@ -14,7 +14,7 @@ d=${tstdata}/partialpurge/
recollindex -Zi $d/testmbox recollindex -Zi $d/testmbox
echo Should have 2 results: testmbox and longmbox: echo Should have 2 results: testmbox and longmbox:
recollq -q deletedmessageuniqueterm recollq -S url -q deletedmessageuniqueterm
echo echo
echo Changing file and reindexing echo Changing file and reindexing
@ -22,17 +22,17 @@ d=${tstdata}/partialpurge/
recollindex -Zi $d/testmbox recollindex -Zi $d/testmbox
echo Should have 1 result: longmbox: echo Should have 1 result: longmbox:
recollq -q deletedmessageuniqueterm recollq -S url -q deletedmessageuniqueterm
echo echo
echo Purging whole test file echo Purging whole test file
recollindex -e $d/testmbox recollindex -e $d/testmbox
echo Should have 1 result: longmbox: echo Should have 1 result: longmbox:
recollq -q deletedmessageuniqueterm recollq -S url -q deletedmessageuniqueterm
echo Should have 2 results: longmbox shortmbox: echo Should have 2 results: longmbox shortmbox:
recollq -q stablemessageuniqueterm recollq -S url -q stablemessageuniqueterm
) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout ) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout

View file

@ -34,11 +34,11 @@ for doc in query:
for fld in ('title', 'testfield', 'filename'): for fld in ('title', 'testfield', 'filename'):
print("getattr(doc, %s) -> [%s]"%(fld,utf8string(getattr(doc, fld)))) print("getattr(doc, %s) -> [%s]"%(fld,utf8string(getattr(doc, fld))))
print("doc.get(%s) -> [%s]"%(fld,utf8string(doc.get(fld)))) print("doc.get(%s) -> [%s]"%(fld,utf8string(doc.get(fld))))
print("\nfor fld in doc.keys():") print("\nfor fld in sorted(doc.keys()):")
for fld in doc.keys(): for fld in sorted(doc.keys()):
print(utf8string("[%s] -> [%s]" % (fld, getattr(doc, fld)))) print(utf8string("[%s] -> [%s]" % (fld, getattr(doc, fld))))
print("\nfor k,v in doc.items().items():") print("\nfor k,v in sorted(doc.items().items()):")
for k,v in doc.items().items(): for k,v in sorted(doc.items().items(), key=lambda itm: itm[0]):
print(utf8string("[%s] -> [%s]" % (k, v))) print(utf8string("[%s] -> [%s]" % (k, v)))
print("\nAccented query:") print("\nAccented query:")

View file

@ -10,7 +10,7 @@ doc.get(testfield) -> [testfieldvalue1]
getattr(doc, filename) -> [htmlfield1.html] getattr(doc, filename) -> [htmlfield1.html]
doc.get(filename) -> [htmlfield1.html] doc.get(filename) -> [htmlfield1.html]
for fld in doc.keys(): for fld in sorted(doc.keys()):
[abstract] -> [ ThisIsTheFieldHtmlTestFile] [abstract] -> [ ThisIsTheFieldHtmlTestFile]
[caption] -> [HTML fields test file: été à noël] [caption] -> [HTML fields test file: été à noël]
[dbytes] -> [27] [dbytes] -> [27]
@ -24,29 +24,29 @@ for fld in doc.keys():
[pcbytes] -> [267] [pcbytes] -> [267]
[rcludi] -> [/home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html|] [rcludi] -> [/home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html|]
[relevancyrating] -> [100%] [relevancyrating] -> [100%]
[sig] -> [2671383154417] [sig] -> [2671402138880]
[testfield] -> [testfieldvalue1] [testfield] -> [testfieldvalue1]
[title] -> [HTML fields test file: été à noël] [title] -> [HTML fields test file: été à noël]
[url] -> [file:///home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html] [url] -> [file:///home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html]
for k,v in doc.items().items(): for k,v in sorted(doc.items().items()):
[testfield] -> [testfieldvalue1]
[ipath] -> []
[url] -> [file:///home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html]
[abstract] -> [ ThisIsTheFieldHtmlTestFile] [abstract] -> [ ThisIsTheFieldHtmlTestFile]
[pcbytes] -> [267] [caption] -> [HTML fields test file: été à noël]
[dbytes] -> [27]
[fbytes] -> [267] [fbytes] -> [267]
[filename] -> [htmlfield1.html] [filename] -> [htmlfield1.html]
[mtype] -> [text/html]
[caption] -> [HTML fields test file: été à noël]
[fmtime] -> [01383154417] [fmtime] -> [01383154417]
[dbytes] -> [27] [ipath] -> []
[sig] -> [2671383154417]
[mtime] -> [01383154417] [mtime] -> [01383154417]
[title] -> [HTML fields test file: été à noël] [mtype] -> [text/html]
[origcharset] -> [utf-8]
[pcbytes] -> [267]
[rcludi] -> [/home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html|] [rcludi] -> [/home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html|]
[relevancyrating] -> [100%] [relevancyrating] -> [100%]
[origcharset] -> [utf-8] [sig] -> [2671402138880]
[testfield] -> [testfieldvalue1]
[title] -> [HTML fields test file: été à noël]
[url] -> [file:///home/dockes/projets/fulltext/testrecoll/html/htmlfield1.html]
Accented query: Accented query:
User query [title:"été à noël"] User query [title:"été à noël"]

View file

@ -7,8 +7,8 @@ initvariables $0
( (
recollq -S mtime -q '"simulating shock turbulence interactions"' recollq -S url -q '"simulating shock turbulence interactions"'
recollq -S mtime Utf8pathunique recollq -S url Utf8pathunique
) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout ) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout

View file

@ -1,6 +1,6 @@
2 results 2 results
image/vnd.djvu [file:///home/dockes/projets/fulltext/testrecoll/utfInPath/accentué/1999_Hu_Shu.OCR.djvu] [1999_Hu_Shu.OCR.djvu] 753409 bytes
image/vnd.djvu [file:///home/dockes/projets/fulltext/testrecoll/utfInPath/accentué/1999_Hu_Shu.OCR.djvu] [1999_Hu_Shu.OCR.djvu] 753409 bytes image/vnd.djvu [file:///home/dockes/projets/fulltext/testrecoll/utfInPath/accentué/1999_Hu_Shu.OCR.djvu] [1999_Hu_Shu.OCR.djvu] 753409 bytes
image/vnd.djvu [file:///home/dockes/projets/fulltext/testrecoll/utfInPath/accentué/1999_Hu_Shu.OCR.djvu] [1999_Hu_Shu.OCR.djvu] 753409 bytes
2 results 2 results
text/plain [file:///home/dockes/projets/fulltext/testrecoll/utfInPath/accentué/utf8path.txt] [utf8path.txt] 49 bytes
text/plain [file:///home/dockes/projets/fulltext/testrecoll/utfInPath/accentué/utf8path.txt] [utf8path.txt] 49 bytes text/plain [file:///home/dockes/projets/fulltext/testrecoll/utfInPath/accentué/utf8path.txt] [utf8path.txt] 49 bytes
text/plain [file:///home/dockes/projets/fulltext/testrecoll/utfInPath/accentué/utf8path.txt] [utf8path.txt] 49 bytes