r1758 - in glibc-package/trunk/debian: . patches/localedata
Author: barbier
Date: 2006-08-16 21:35:33 +0000 (Wed, 16 Aug 2006)
New Revision: 1758
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/localedata/cvs-localedata.diff
Log:
* debian/patches/localedata/cvs-localedata.diff: A new test target
tst-strfmon1 was previously added into localedata/Makefile,
so add localedata/tst-strfmon1.c to really perform this test.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2006-08-16 20:40:10 UTC (rev 1757)
+++ glibc-package/trunk/debian/changelog 2006-08-16 21:35:33 UTC (rev 1758)
@@ -1,13 +1,19 @@
glibc (2.3.6.ds1-2) UNRELEASED; urgency=low
+ [ Aurelien Jarno ]
* rules.d/build.mk: removed the call to texi2html.
* debian/patches/localedata/reverted-for-etch.diff: revert a few locales
changes done in 2.3.6.ds1-1 and refused by the release managers:
- locales/vi_VN: Various fixes
- locales/ru_RU: Use U2002 for thousands_sep and mon_throusands_sep.
- -- Aurelien Jarno <aurel32@debian.org> Tue, 15 Aug 2006 23:58:46 +0200
+ [ Denis Barbier ]
+ * debian/patches/localedata/cvs-localedata.diff: A new test target
+ tst-strfmon1 was previously added into localedata/Makefile,
+ so add localedata/tst-strfmon1.c to really perform this test.
+ -- Denis Barbier <barbier@debian.org> Wed, 16 Aug 2006 23:28:35 +0200
+
glibc (2.3.6.ds1-1) unstable; urgency=low
[ Denis Barbier ]
Modified: glibc-package/trunk/debian/patches/localedata/cvs-localedata.diff
===================================================================
--- glibc-package/trunk/debian/patches/localedata/cvs-localedata.diff 2006-08-16 20:40:10 UTC (rev 1757)
+++ glibc-package/trunk/debian/patches/localedata/cvs-localedata.diff 2006-08-16 21:35:33 UTC (rev 1758)
@@ -18658,3 +18658,50 @@
return result;
}
+Index: localedata/tst-strfmon1.c
+===================================================================
+--- /dev/null
++++ localedata/tst-strfmon1.c
+@@ -0,0 +1,42 @@
++#include <monetary.h>
++#include <locale.h>
++#include <stdio.h>
++#include <string.h>
++
++static const struct
++{
++ const char *locale;
++ const char *expected;
++} tests[] =
++ {
++ { "de_DE.ISO-8859-1", "|-12,34 EUR|-12,34|" },
++ { "da_DK.ISO-8859-1", "|kr -12,34|-12,34|" },
++ { "zh_TW.EUC-TW", "|-NT$12.34|-12.34|" },
++ { "sv_SE.ISO-8859-1", "|-12,34 kr|-12,34|" }
++ };
++#define ntests (sizeof (tests) / sizeof (tests[0]))
++
++
++static int
++do_test (void)
++{
++ int res = 0;
++ for (int i = 0; i < ntests; ++i)
++ {
++ char buf[500];
++ if (setlocale (LC_ALL, tests[i].locale) == NULL)
++ {
++ printf ("failed to set locale %s\n", tests[i].locale);
++ res = 1;
++ continue;
++ }
++ strfmon (buf, sizeof (buf), "|%n|%!n|", -12.34, -12.34);
++ int fail = strcmp (buf, tests[i].expected) != 0;
++ printf ("%s%s\n", buf, fail ? " *** FAIL ***" : "");
++ res |= fail;
++ }
++ return res;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
Reply to: