diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-08-28 14:06:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:16:50 -0500 |
commit | 200619b3687e1eb07e87f7d32104effab1920d77 (patch) | |
tree | 4ae4836c4db6353d1035151d5ff02825b21ca3f9 /source4/lib/talloc | |
parent | a93ad7490c5522095d433590b25ae83ccfe529c3 (diff) | |
download | samba-200619b3687e1eb07e87f7d32104effab1920d77.tar.gz samba-200619b3687e1eb07e87f7d32104effab1920d77.tar.bz2 samba-200619b3687e1eb07e87f7d32104effab1920d77.zip |
r17883: check if talloc_asprintf() works correct
metze
(This used to be commit bb79542edbb290c7dbea7c921b0e911dd1b3366b)
Diffstat (limited to 'source4/lib/talloc')
-rw-r--r-- | source4/lib/talloc/testsuite.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |