blob: 46a10c7b427c988fb2a4fb1d37d530c549faf1df (
plain)
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
42
43
44
45
46
47
48
49
50
51
52
|
#!/usr/bin/env zsh
index=delete-me
files=(
one ' On October 11th 2005, the KDE Project released KOffice 1.4.2. KOffice is a free light-weight yet feature rich office solution that integrates with KDE, supports the OASIS OpenDocument file format as does OpenOffice.org 2 and provides filters for other office suites such as Microsoft Office. Read the KOffice 1.4.2 Release Notes.'
two 'KDE is a powerful Free Software graphical desktop environment for Linux and Unix workstations. It combines ease of use, contemporary functionality, and outstanding graphical design with the technological superiority of the Unix operating system. More... '
three 'The YaKuake Package for Debian sarge and sid.
Yet Another Kuake aka YaKuake VERSION 2.6
http://www.kde-look.org/content/show.php?content=29153
have fun!
Thx OldKid for compile on debian amd64.
'
numbers '123456789'
)
expected=( \
kde "onetwothree"
noshow "Empty results"
poWeRFuL 'two'
'kde BUT debian' "onetwo"
debian 'three'
'12345678' 'numbers'
)
driver=./indexlibadmin
unittests=./testdriver
$unittests
echo "Running tests on the command line..."
mkdir $index
for name data in $files; do
$driver add $index $name - <<<$data
done
for q res in $expected ; do
$driver search $index $q | tr -d '\n' | read got
if test $res != $got; then
echo "ERROR in test '$q'"
echo "EXPECTED:"
echo -$res-
echo "GOT:"
echo -$got-
fi
done
rm -rf $index
echo "done."
|