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