From 200619b3687e1eb07e87f7d32104effab1920d77 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 28 Aug 2006 14:06:23 +0000 Subject: r17883: check if talloc_asprintf() works correct metze (This used to be commit bb79542edbb290c7dbea7c921b0e911dd1b3366b) --- source4/lib/talloc/testsuite.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source4/lib/talloc/testsuite.c b/source4/lib/talloc/testsuite.c index 7cd6429085..f3b20fe657 100644 --- a/source4/lib/talloc/testsuite.c +++ b/source4/lib/talloc/testsuite.c @@ -491,6 +491,10 @@ static BOOL test_misc(void) 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); -- cgit