1#! /bin/sh
2
3# Test c-format handling.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mf-test4.po"
9cat <<EOF >mf-test4.po
10# SOME DESCRIPTIVE TITLE.
11# Copyright (C) YEAR Free Software Foundation, Inc.
12# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
13#
14#, fuzzy
15msgid ""
16msgstr ""
17"Project-Id-Version: msgfmt test 4\n"
18"PO-Revision-Date: 1996-04-05 19:47+0200\n"
19"Last-Translator: Ulrich Drepper <drepper@gnu.org>\n"
20"Language-Team: test <test@li.org>\n"
21"MIME-Version: 1.0\n"
22"Content-Type: text/plain; charset=ISO-8859-1\n"
23"Content-Transfer-Encoding: 8bit\n"
24#
25#, no-c-format
26msgid "no percent"
27msgstr "but here %d is one"
28#
29#, c-format
30msgid "in the %d normal %c order %s\n"
31msgstr "but %2$c not %3$s here %1$d\n"
32#
33# If no c-format is given no check is wanted, not only if no-c-format is there.
34msgid "This is a string %s"
35msgstr "...but this $s not"
36EOF
37
38: ${MSGFMT=msgfmt}
39${MSGFMT} -o /dev/null mf-test4.po 2> /dev/null
40result=$?
41
42rm -fr $tmpfiles
43
44exit $result
45