svn commit: samba r7901 - in
branches/SAMBA_4_0/source/torture/local: .
tridge at samba.org
tridge at samba.org
Sat Jun 25 06:13:29 GMT 2005
Author: tridge
Date: 2005-06-25 06:13:29 +0000 (Sat, 25 Jun 2005)
New Revision: 7901
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7901
Log:
check if system supports UTF-16LE at all in LOCAL-ICONV test
Modified:
branches/SAMBA_4_0/source/torture/local/iconv.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/local/iconv.c
===================================================================
--- branches/SAMBA_4_0/source/torture/local/iconv.c 2005-06-25 05:03:29 UTC (rev 7900)
+++ branches/SAMBA_4_0/source/torture/local/iconv.c 2005-06-25 06:13:29 UTC (rev 7901)
@@ -315,9 +315,17 @@
unsigned char inbuf[1000];
int ok = 1;
unsigned int codepoint, i, c;
+ static iconv_t cd;
- srandom(time(NULL));
+ srandom(time(NULL));
+ cd = iconv_open("UTF-16LE", "UCS-4LE");
+ if (cd == (iconv_t)-1) {
+ printf("unable to test - system iconv library does not support UTF-16LE -> UCS-4LE\n");
+ return True;
+ }
+ iconv_close(cd);
+
printf("Testing next_codepoint()\n");
for (codepoint=0;ok && codepoint<(1<<20);codepoint++) {
ok = test_codepoint(codepoint);
More information about the samba-cvs
mailing list