summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-ycp-1
blob: b6d43486088306f9668c2329e7b6ab224b636652 (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
#!/bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
#
# Plural test for YCP
#

cat <<EOF > xg-y-1.ycp
title = sformat (_("%1 package", "%1 packages", num), num);
EOF

: ${XGETTEXT=xgettext}
${XGETTEXT} --omit-header --no-location -k:1,2 -d xg-y-1.tmp xg-y-1.ycp || exit 1
LC_ALL=C tr -d '\r' < xg-y-1.tmp.po > xg-y-1.po || exit 1

cat <<EOF > xg-y-1.ok
#, ycp-format
msgid "%1 package"
msgid_plural "%1 packages"
msgstr[0] ""
msgstr[1] ""
EOF

: ${DIFF=diff}
${DIFF} xg-y-1.ok xg-y-1.po
result=$?

exit $result