Changeset 1178 in MondoRescue for branches/stable/mondo/src/test


Ignore:
Timestamp:
Feb 17, 2007, 2:27:26 AM (17 years ago)
Author:
Bruno Cornec
Message:

Continue to merge trunk memory management enhancements for libmondo-tools.c & libmondo-string.c
Introduction + test of a new function mr_strcat

Location:
branches/stable/mondo/src/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/test/test-mem.c

    r1140 r1178  
    11#include <stdio.h>
    22#include <stdlib.h>
     3#include <string.h>
    34#include <assert.h>
    45
     
    3132    mr_free(str);
    3233
     34    printf("*** Test with mr_strcat\n");
     35    mr_asprintf(&str,"Another Chain");
     36    mr_strcat(str," of trust");
     37    printf("Result: %s\n",str);
     38    mr_free(str);
     39
    3340    printf("*** Test with mr_getline/mr_free\n");
    3441    fd = mr_fopen("/etc/passwd","r");
  • branches/stable/mondo/src/test/test-mem.res

    r1134 r1178  
    1 *** Test with mr_free
     1*** Test with mr_malloc/mr_free
    22pointer is NOT null
    33pointer is null
     4*** Test with mr_asprintf/mr_free
     5Result: Chain of trust
     6*** Test with mr_strcat
     7Result: Another Chain of trust
     8*** Test with mr_getline/mr_free
     91st Result: root:x:0:0:root:/root:/bin/bash
     102nd Result: bin:x:1:1:bin:/bin:/bin/sh
     113rd Result: another line
    412*** Test with NULL
    513pointer is null
Note: See TracChangeset for help on using the changeset viewer.