No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-c-8
blob9bef7cc1038a3ea2ac5472e4330dd71c9146b205
1 #! /bin/sh
3 # Test recognition of ISO C 99 <inttypes.h> format string directives.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-c-8.c"
9 cat <<EOF > xg-c-8.c
10 void foo ()
12 printf (_("File size is: %" PRId64), size);
13 printf (_("File age is %10" PRIdMAX " microseconds"), age);
14 printf (_(PRIXFAST16 " errors"), nerrs);
15 printf (_(PRIXFAT16 " mistakes"), nerrs);
17 EOF
19 tmpfiles="$tmpfiles xg-c-8.po"
20 : ${XGETTEXT=xgettext}
21 ${XGETTEXT} --omit-header --no-location -k_ -o xg-c-8.po xg-c-8.c
22 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
24 tmpfiles="$tmpfiles xg-c-8.ok"
25 cat <<EOF > xg-c-8.ok
26 #, c-format
27 msgid "File size is: %<PRId64>"
28 msgstr ""
30 #, c-format
31 msgid "File age is %10<PRIdMAX> microseconds"
32 msgstr ""
34 #, c-format
35 msgid "<PRIXFAST16> errors"
36 msgstr ""
38 #, c-format
39 msgid " mistakes"
40 msgstr ""
41 EOF
43 : ${DIFF=diff}
44 ${DIFF} xg-c-8.ok xg-c-8.po
45 result=$?
47 rm -fr $tmpfiles
49 exit $result