~ubuntu-branches/ubuntu/precise/dbacl/precise

« back to all changes in this revision

Viewing changes to src/tests/email-maildir.shin

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams
  • Date: 2005-05-07 12:59:53 UTC
  • Revision ID: james.westby@ubuntu.com-20050507125953-xzy2bwkb2qamglwm
Tags: upstream-1.9
ImportĀ upstreamĀ versionĀ 1.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# test basic maildir style parsing
 
3
PATH=/bin:/usr/bin
 
4
DBACL=$TESTBIN/dbacl
 
5
 
 
6
prerequisite_command() {
 
7
    type $2 2>&1 > /dev/null
 
8
    if [ 0 -ne $? ]; then
 
9
        echo "$1: $2 not found, test will be skipped"
 
10
        exit 77
 
11
    fi
 
12
}
 
13
 
 
14
prerequisite_command $0 grep
 
15
prerequisite_command $0 cut
 
16
 
 
17
DBACL_PATH="`pwd`/`basename $0 .sh`_`date +"%Y%m%dT%H%M%S"`"
 
18
export DBACL_PATH
 
19
 
 
20
mkdir "$DBACL_PATH"
 
21
 
 
22
$DBACL -l dummy -T email sample.spam-1 sample.spam-2 \
 
23
    > "$DBACL_PATH/out"
 
24
NUM=`head -3 "$DBACL_PATH/dummy" | grep '# hash_size' | cut -d ' ' -f 9`
 
25
 
 
26
rm -rf "$DBACL_PATH"
 
27
 
 
28
test x$NUM = x"2"
 
 
b'\\ No newline at end of file'