No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-ycp-1
blob0ad3e226a36db4c9c549fe3bb5cb560bcaf2f659
1 #!/bin/sh
3 # Plural test for YCP
6 tmpfiles=""
7 trap 'rm -fr $tmpfiles' 1 2 3 15
9 tmpfiles="$tmpfiles xg-y-1.ycp"
10 cat <<EOF > xg-y-1.ycp
11 title = sformat (_("%1 package", "%1 packages", num), num);
12 EOF
14 tmpfiles="$tmpfiles xg-y-1.po"
15 : ${XGETTEXT=xgettext}
16 ${XGETTEXT} --omit-header --no-location -k:1,2 -d xg-y-1 xg-y-1.ycp
17 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
19 tmpfiles="$tmpfiles xg-y-1.ok"
20 cat <<EOF > xg-y-1.ok
21 #, ycp-format
22 msgid "%1 package"
23 msgid_plural "%1 packages"
24 msgstr[0] ""
25 msgstr[1] ""
26 EOF
28 : ${DIFF=diff}
29 ${DIFF} xg-y-1.ok xg-y-1.po
30 result=$?
32 rm -fr $tmpfiles
34 exit $result