Child: [dc7503] (diff)

Download this file

partialpurge.sh    42 lines (28 with data), 944 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
topdir=`dirname $0`/..
. $topdir/shared.sh
initvariables $0
d=${tstdata}/partialpurge/
# Check that partial purge works: the message orphaned by shortening
# the mbox should not exist in the index any more
(
cp $d/longmbox $d/testmbox
recollindex -Zi $d/testmbox
echo Should have 2 results: testmbox and longmbox:
recollq -q deletedmessageuniqueterm
echo
echo Changing file and reindexing
cp $d/shortmbox $d/testmbox
recollindex -Zi $d/testmbox
echo Should have 1 result: longmbox:
recollq -q deletedmessageuniqueterm
echo
echo Purging whole test file
recollindex -e $d/testmbox
echo Should have 1 result: longmbox:
recollq -q deletedmessageuniqueterm
echo Should have 2 results: longmbox shortmbox:
recollq -q stablemessageuniqueterm
) 2> $mystderr | egrep -v '^Recoll query: ' > $mystdout
diff -w ${myname}.txt $mystdout > $mydiffs 2>&1
checkresult