1#! /bin/sh
2# Do not edit this file!
3# this file is generated by 'generate_test.pl'.
4
5#
6# ARABIC-INDIC DIGITS context rule test.
7# The input name is just U+0664 U+06F5
8# (ARABIC-INDIC DIGIT FOUR and EXTENDED ARABIC-INDIC DIGIT FIVE).
9#
10#             api: encodename
11#  local_encoding: U-escape
12#            conf:
13#            from: \u{664}\u{6f5}
14#         actions: IDN_UNICODECONV IDN_CTXOCHECK IDN_LOCALCONV
15#          result: CONTEXTO check failed
16#              to:
17
18################## setup ##################
19
20unset LC_ALL
21unset LC_CTYPE
22unset LC_MESSAGES
23unset LANG
24unset IDN_LOCAL_CODESET
25unset IDN_LOG_LEVEL
26
27SRCDIR=`dirname $0`
28SYSCONFDIR=${SYSCONFDIR-"/etc"}
29IGNORE=false
30export IDN_LOCAL_CODESET; IDN_LOCAL_CODESET=U-escape
31
32rm -f idn2.conf
33touch idn2.conf
34echo '' >> idn2.conf
35
36rm -f localmap1
37rm -f localmap2
38rm -f localmap3
39rm -f localmap4
40rm -f localset
41rm -f expect.txt
42rm -f output.txt
43
44################## test ##################
45
46echo 'from: \u{664}\u{6f5}' >> expect.txt
47echo 'result: CONTEXTO check failed' >> expect.txt
48echo 'to: ' >> expect.txt
49../common/test_encodename -conffile=idn2.conf -localcheckfile=  -unicodeconv -ctxocheck -localconv -- '\u{664}\u{6f5}' > output.txt
50
51################## teardown ##################
52
53cmp expect.txt output.txt > /dev/null 2>&1
54RESULT=$?
55[ X$IGNORE = Xtrue ] && RESULT=77
56if [ X$QUIET != Xtrue ]; then
57    if [ $RESULT -eq 0 ]; then
58        echo "PASS: $0"
59    elif [ $RESULT -eq 77 ]; then
60        echo "SKIP: $0"
61    else
62        echo "FAIL: $0"
63    fi
64fi
65[ $RESULT -eq 0 -o $RESULT -eq 77 ] || exit $RESULT
66rm -f idn2.conf
67rm -f localmap1
68rm -f localmap2
69rm -f localmap3
70rm -f localmap4
71rm -f localset
72rm -f expect.txt
73rm -f output.txt
74exit $RESULT
75