svn commit: samba r17883 - in branches/SAMBA_4_0/source/lib/talloc: .

metze at samba.org metze at samba.org
Mon Aug 28 14:06:24 GMT 2006


Author: metze
Date: 2006-08-28 14:06:23 +0000 (Mon, 28 Aug 2006)
New Revision: 17883

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17883

Log:
check if talloc_asprintf() works correct

metze
Modified:
   branches/SAMBA_4_0/source/lib/talloc/testsuite.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/talloc/testsuite.c
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/testsuite.c	2006-08-28 12:15:13 UTC (rev 17882)
+++ branches/SAMBA_4_0/source/lib/talloc/testsuite.c	2006-08-28 14:06:23 UTC (rev 17883)
@@ -491,6 +491,10 @@
 
 	p1 = talloc_init("%d bytes", 200);
 	p2 = talloc_asprintf(p1, "my test '%s'", "string");
+	if (strcmp(p2, "my test 'string'") != 0) {
+		printf("failed: talloc_asprintf(\"my test '%%s'\", \"string\") gave: \"%s\"\n", p2);
+		return False;
+	}
 	CHECK_BLOCKS(p1, 3);
 	CHECK_SIZE(p2, 17);
 	CHECK_BLOCKS(root, 1);



More information about the samba-cvs mailing list