1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test recognition of ISO C 99 <inttypes.h> format string directives.
5
6cat <<EOF > xg-c-format-2.c
7void foo ()
8{
9  printf (_("File size is: %" PRId64), size);
10  printf (_("File age is %10" PRIdMAX " microseconds"), age);
11  printf (_(PRIXFAST16 " errors"), nerrs);
12  printf (_(PRIXFAT16 " mistakes"), nerrs);
13}
14EOF
15
16: ${XGETTEXT=xgettext}
17${XGETTEXT} --omit-header --no-location -k_ -o xg-c-format-2.tmp xg-c-format-2.c || Exit 1
18LC_ALL=C tr -d '\r' < xg-c-format-2.tmp > xg-c-format-2.po || Exit 1
19
20cat <<EOF > xg-c-format-2.ok
21#, c-format
22msgid "File size is: %<PRId64>"
23msgstr ""
24
25#, c-format
26msgid "File age is %10<PRIdMAX> microseconds"
27msgstr ""
28
29#, c-format
30msgid "<PRIXFAST16> errors"
31msgstr ""
32
33#, c-format
34msgid " mistakes"
35msgstr ""
36EOF
37
38: ${DIFF=diff}
39${DIFF} xg-c-format-2.ok xg-c-format-2.po
40result=$?
41
42exit $result
43