File: ja-namazu-1

package info (click to toggle)
namazu2 2.0.21-22
  • links: PTS
  • area: main
  • in suites: buster
  • size: 7,032 kB
  • sloc: ansic: 14,161; perl: 10,789; sh: 9,355; lisp: 1,147; makefile: 914
file content (44 lines) | stat: -rwxr-xr-x 867 bytes parent folder | download | duplicates (9)
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
#! /bin/sh
#
# Test for phrase search.
#
LOG=`pwd`/test-log
echo '  *** starting ' $0 >>$LOG

EXEC=no

lc_all=$LC_ALL
lc_ctype=$LC_CTYPE
lang=$LANG

for ctype in "$lc_all" "$lc_ctype" "$lang"; do
    if test -n "$ctype" -a "$ctype" = "C"; then
        ctype="en"
        break
    fi
    cand=`echo "$ctype" | LC_ALL="C" perl -nle 'print $1 if /^(..)/'`
    if test -n "$cand"; then
        ctype=$cand
        break
    fi
done

case $ctype in 
        ja*)
                EXEC=yes
                ;;
esac
if [ $EXEC = 'no' ]
then
        echo "Skipping because of LANG does not begin with ja: $0" >> $LOG
        exit 77
fi

# Check Jaapanese phrease searching.
cd ../src
./namazu '{ؿ ɲ}' ../tests/ja-idx1 | egrep ':: [1-9]' >/dev/null
test $? -ne 0 && exit 1
./namazu '{ؿ ɲ}' ../tests/ja-idx1 | egrep ':: 0' >/dev/null
test $? -ne 0 && exit 0

exit 1