Changeset 900 in MondoRescue for trunk/mondo/src/test
- Timestamp:
- Oct 24, 2006, 8:49:18 AM (19 years ago)
- Location:
- trunk/mondo/src/test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/src/test/mktest
r768 r900 7 7 8 8 gcc -O2 -I../common -I../lib test-conf.c ../lib/mr_conf.c ../common/libmondo-msg.c -o test-conf 9 gcc -O2 -I../common -I../lib test-string.c ../lib/mr_str ing.c -o test-string9 gcc -O2 -I../common -I../lib test-string.c ../lib/mr_str.c -o test-string 10 10 11 11 for f in "test-conf"; do -
trunk/mondo/src/test/test-conf.c
r768 r900 9 9 #include "my-stuff.h" 10 10 #include "mr_conf.h" 11 #include "mr_mem.h" 11 12 12 13 int g_main_pid = 0; … … 38 39 } 39 40 fprintf(stdout, "String : ***%s***\n",s); 40 paranoid_free(s);41 mr_free(s); 41 42 mr_conf_close(); 42 43 exit(0); -
trunk/mondo/src/test/test-string.c
r768 r900 12 12 13 13 #include "my-stuff.h" 14 #include "mr_string.h" 14 #include "mr_str.h" 15 #include "mr_mem.h" 15 16 16 17 main() { … … 21 22 char *string = NULL; 22 23 23 asprintf(&string, "%s", "md0 : active raid10 hda1[0] hda12[3] hda6[2] hda5[1]\n");24 mr_asprintf(&string, "%s", "md0 : active raid10 hda1[0] hda12[3] hda6[2] hda5[1]\n"); 24 25 fprintf(stdout, "string=|%s|\n", string); 25 26 token = mr_strtok(string, delims, &lastpos); 26 27 while (lastpos > 0) { 27 28 fprintf(stdout, "token=|%s|, lastpos=%d\n", token, lastpos); 28 paranoid_free(token);29 mr_free(token); 29 30 token = mr_strtok(string, delims, &lastpos); 30 31 } 31 paranoid_free(string);32 mr_free(string); 32 33 exit(0); 33 34 }
Note:
See TracChangeset
for help on using the changeset viewer.