3 # Test of --tcl option.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 # Test whether we can execute Tcl programs and Tcl's fconfigure command
9 # understands the -encoding option (it does since approximately Tcl 8.1).
10 tmpfiles
="$tmpfiles version.tcl"
11 cat <<\EOF
> version.tcl
12 fconfigure stdout
-encoding utf-8
15 (tclsh version.tcl
) >/dev
/null
2>/dev
/null \
16 ||
{ rm -fr $tmpfiles; exit 77; }
18 tmpfiles
="$tmpfiles fr.po"
21 msgstr
"Content-Type: text/plain; charset=ISO-8859-1\n"
24 msgid
"'Your command, please?', asked the waiter."
25 msgstr
"«Votre commande, s'il vous plait», dit le garçon."
27 # Reverse the arguments.
30 msgid
"%s is replaced by %s."
31 msgstr
"%2$s remplace %1$s."
34 tmpfiles
="$tmpfiles msgs"
35 test -d msgs || mkdir msgs
38 ${MSGFMT} --tcl -d msgs
-l fr fr.po ||
exit 1
40 tmpfiles
="$tmpfiles prog.out"
41 : ${MSGUNFMT=msgunfmt}
42 GETTEXTDATADIR
=${top_srcdir}/src \
43 ${MSGUNFMT} --tcl -d msgs
-l fr
-o prog.out ||
exit 1
45 tmpfiles
="$tmpfiles prog.ok"
48 msgstr
"Content-Type: text/plain; charset=UTF-8\n"
50 msgid
"'Your command, please?', asked the waiter."
51 msgstr
"«Votre commande, s'il vous plait», dit le garçon."
53 msgid
"%s is replaced by %s."
54 msgstr
"%2$s remplace %1$s."
57 ${DIFF} prog.ok prog.out ||
exit 1