~ubuntu-branches/ubuntu/maverick/kakasi/maverick

« back to all changes in this revision

Viewing changes to tests/kakasi-2

  • Committer: Bazaar Package Importer
  • Author(s): Keita Maehara
  • Date: 2010-03-21 15:27:39 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100321152739-f6qx1m9nfln7m3p1
Tags: 2.3.5~pre1+cvs20071101-1
* Maintainer release.
* New upstream snapshot (Closes: #184286, #162890, #273249, #273250,
  #545045).
* Updated Standards-Version to 3.8.4.
* Switch to dpkg-source 3.0 (quilt) format.
* Switch to debhelper 7.
* Updated references to the upstream URL.
* Now libkakasi2-dev is in section libdevel.
* Removed symlinks to undocumented(7).
* Added missing upstream docs.
* Moved kakasi-config to libkakasi2-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
#
 
3
# test for romaji conversion
 
4
#
 
5
# $Id: kakasi-2,v 1.3 2006-09-21 07:32:59 knok Exp $
 
6
 
 
7
LOG=`pwd`/test-log
 
8
echo '  *** starting ' $0 >> $LOG
 
9
 
 
10
. env.sh
 
11
 
 
12
romacheck () {
 
13
        KAKASI=../src/kakasi
 
14
 
 
15
        echo 'hira to roma' >> $LOG
 
16
        for opt in -rh -rk '-t -rh'
 
17
        do
 
18
                ret=`echo $hira | $KAKASI $opt -ieuc -Ha`
 
19
                if [ ! "x$ret" = "x$roma" ]
 
20
                then
 
21
                        echo "failed." >> $LOG
 
22
                        echo "opt: $opt" >> $LOG
 
23
                        echo "input: $hira" >> $LOG
 
24
                        echo "output: $ret" >> $LOG
 
25
                        exit 1
 
26
                fi
 
27
        done
 
28
 
 
29
        echo 'kata to roma' >> $LOG
 
30
        for opt in -rh -rk '-t -rh'
 
31
        do
 
32
                ret=`echo $kata | $KAKASI $opt -ieuc -Ka`
 
33
                if [ ! "x$ret" = "x$roma" ]
 
34
                then
 
35
                        echo "failed." >> $LOG
 
36
                        echo "opt: $opt" >> $LOG
 
37
                        echo "input: $kata" >> $LOG
 
38
                        echo "output: $ret" >> $LOG
 
39
                        exit 1
 
40
                fi
 
41
        done
 
42
}
 
43
 
 
44
#
 
45
hira='�� �� �� �� �� �� �� �� �� ��'
 
46
kata='�� �� �� �� �� �� �� �� �� ��'
 
47
roma='a ka sa ta na ha ma ya ra wa'
 
48
 
 
49
romacheck
 
50
 
 
51
hira='�� �� �� �� �� �� �� �� �� ��'
 
52
kata='�� �� �� �� �� �� �� �� �� ��'
 
53
roma='o ko so to no ho mo yo ro wo'
 
54
 
 
55
romacheck
 
56
 
 
57
exit 0