summaryrefslogtreecommitdiffstats
path: root/indexlib/tests/run-tests.zsh
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /indexlib/tests/run-tests.zsh
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'indexlib/tests/run-tests.zsh')
-rwxr-xr-xindexlib/tests/run-tests.zsh52
1 files changed, 52 insertions, 0 deletions
diff --git a/indexlib/tests/run-tests.zsh b/indexlib/tests/run-tests.zsh
new file mode 100755
index 000000000..46a10c7b4
--- /dev/null
+++ b/indexlib/tests/run-tests.zsh
@@ -0,0 +1,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."