1#! /bin/sh
2# Do not edit this file!
3# this file is generated by 'generate_test.pl'.
4
5#
6# Configuration file loading test.
7# 'language' entry without a language name.
8#
9#             api: encodename
10#  local_encoding: U-escape
11#            conf: language
12#            from: ABC
13#         actions: IDN_ENCODE_REGIST
14#          result: idn_resconf_loadfile() ERROR: syntax error
15#              to:
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 'language' >> 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: ABC' >> expect.txt
46echo 'result: idn_resconf_loadfile() ERROR: syntax error' >> expect.txt
47echo 'to: ' >> expect.txt
48../common/test_encodename -conffile=idn2.conf -localcheckfile=  -encode-regist -- 'ABC' > 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