mirror of
https://github.com/samba-team/samba.git
synced 2025-08-27 05:49:32 +03:00
r17883: check if talloc_asprintf() works correct
metze
(This used to be commit bb79542edb
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
a93ad7490c
commit
200619b368
@ -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);
|
||||
|
Reference in New Issue
Block a user