1#! /bin/sh
2# Do not edit this file!
3# this file is generated by 'generate_test.pl'.
4
5#
6# Maaping test.
7# Combined map procedure name "tr46-processing-deviation".
8# The input name is U+2132 (turned F).
9#
10#             api: decodename
11#  local_encoding: U-escape
12#            conf: map tr46-processing-deviation
13#            from: \u{2132}
14#         actions: IDN_UNICODECONV IDN_MAP IDN_LOCALCONV
15#          result: TR #46 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 'map tr46-processing-deviation' >> 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{2132}' >> expect.txt
47echo 'result: TR #46 check failed' >> expect.txt
48echo 'to: ' >> expect.txt
49../common/test_decodename -conffile=idn2.conf -localcheckfile=  -unicodeconv -map -localconv -- '\u{2132}' > 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