summaryrefslogtreecommitdiffstats
path: root/tests/msgfmt-4
blob: 2a22faca9448c321db0aa4e6cccfc15fc774332e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /bin/sh

trap 'rm -fr $tmpfiles' 1 2 3 15

tmpfiles="mf-test4.po"
cat <<EOF >mf-test4.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: msgfmt test 4\n"
"PO-Revision-Date: 1996-04-05 19:47+0200\n"
"Last-Translator: Ulrich Drepper <drepper@gnu.ai.mit.edu>\n"
"Language-Team: test <test@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
#
#, no-c-format
msgid "no percent"
msgstr "but here %d is one"
#
#, c-format
msgid "in the %d normal %c order %s\n"
msgstr "but %2$c not %3$s here %1$d\n"
#
# If no c-format is given no check is wanted, not only if no-c-format is there.
msgid "This is a string %s"
msgstr "...but this $s not"
EOF

: ${MSGFMT=msgfmt}
${MSGFMT} mf-test4.po -o /dev/null 2> /dev/null
result=$?

rm -fr $tmpfiles

exit $result

# Preserve executable bits for this shell script.
# Thanks to Noah Friedman for this great trick.
Local Variables:
eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
eval:(make-local-variable 'file-mode)
eval:(setq file-mode (file-modes (buffer-file-name)))
eval:(make-local-variable 'after-save-hook)
eval:(add-hook 'after-save-hook 'frobme)
End: