diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-03-12 15:24:17 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-03-12 15:24:17 +0100 |
commit | 2bf99110b866cfecf5ec03eab77b49f3e70dec1e (patch) | |
tree | 6e2aeec2c2e546ff03d0c22b5e343b9a3da2fc9e | |
parent | a1165f6b79efe2e3bab6ce3b3d1266af340a884b (diff) | |
download | wolfbones-2bf99110b866cfecf5ec03eab77b49f3e70dec1e.tar.gz wolfbones-2bf99110b866cfecf5ec03eab77b49f3e70dec1e.tar.bz2 |
enable gettext tests
-rw-r--r-- | tests/GNUmakefile | 2 | ||||
-rw-r--r-- | tests/gettext/test_gettext.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/GNUmakefile b/tests/GNUmakefile index b408068..71019e7 100644 --- a/tests/GNUmakefile +++ b/tests/GNUmakefile @@ -1,6 +1,6 @@ TOPDIR = .. -SUBDIRS = port log daemon +SUBDIRS = port log gettext daemon -include $(TOPDIR)/makefiles/gmake/sub.mk diff --git a/tests/gettext/test_gettext.c b/tests/gettext/test_gettext.c index 4d88f90..b862f9d 100644 --- a/tests/gettext/test_gettext.c +++ b/tests/gettext/test_gettext.c @@ -51,16 +51,18 @@ int main( void ) { /* print something localized */ puts( _( "A message without parameters" ) ); + /* croaks in older gcc because the format string is used with a function * without __attribute__ format definitions, this may also depend on the * age of gettext and libintl? */ printf( _( "A message with two parameters, a string %s and an integer %d\n" ), "string_param", 47 ); + /* try POSIX positional arguments, gives a * test_gettext.c:79: warning: ISO C does not support %n$ operand number formats */ - /* printf( _( "We must insert %1$d coins into %2$s" ), - 55, "the box" ); */ + printf( _( "We must insert %1$d coins into %2$s" ), + 55, "the box" ); return EXIT_SUCCESS; } |