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

« back to all changes in this revision

Viewing changes to src/tests/dbacl-jap.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 Japanese parsing
 
3
# this should work in the C locale
 
4
#
 
5
# you can also check out the tokens directly in a "kterm -km sjis".
 
6
#
 
7
PATH=/bin:/usr/bin
 
8
DBACL=$TESTBIN/dbacl
 
9
 
 
10
prerequisite_command() {
 
11
    type $2 2>&1 > /dev/null
 
12
    if [ 0 -ne $? ]; then
 
13
        echo "$1: $2 not found, test will be skipped"
 
14
        exit 77
 
15
    fi
 
16
}
 
17
 
 
18
prerequisite_command $0 grep
 
19
 
 
20
DBACL_PATH="`pwd`/`basename $0 .sh`_`date +"%Y%m%dT%H%M%S"`"
 
21
export DBACL_PATH
 
22
 
 
23
mkdir "$DBACL_PATH"
 
24
 
 
25
cat $DOCDIR/japanese.txt \
 
26
    | $DBACL -l dummy -e cef
 
27
head -3 "$DBACL_PATH/dummy" \
 
28
    | grep '# hash_size 15 features 8614 unique_features 523 documents 0' \
 
29
    > /dev/null
 
30
 
 
31
RESULT=$?
 
32
rm -rf "$DBACL_PATH"
 
33
 
 
34
exit $RESULT
 
 
b'\\ No newline at end of file'