Changeset 768 in MondoRescue for trunk/mondo/mondo/test
- Timestamp:
- Aug 8, 2006, 3:51:12 PM (18 years ago)
- Location:
- trunk/mondo/mondo/test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/test/mktest
r561 r768 6 6 # 7 7 8 gcc -O2 -I../common test-conf.c ../common/libmondo-conf.c ../common/libmondo-msg.c -o test-conf9 gcc -O2 -I../common test-string.c ../common/libmondo-string.c ../common/libmondo-msg.c -o test-string8 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_string.c -o test-string 10 10 11 11 for f in "test-conf"; do -
trunk/mondo/mondo/test/test-conf.c
r531 r768 8 8 #include <stdio.h> 9 9 #include "my-stuff.h" 10 #include " libmondo-conf.h"10 #include "mr_conf.h" 11 11 12 12 int g_main_pid = 0; … … 19 19 char *s = NULL; 20 20 21 if ((ret = mr conf_open("mondo.conf")) != 0) {21 if ((ret = mr_conf_open("mondo.conf")) != 0) { 22 22 fprintf(stderr,"Unable to open conf file (%d)\n",ret); 23 23 exit(-1); 24 24 } 25 if ((i = mr conf_iread("testinteger")) == 0) {25 if ((i = mr_conf_iread("testinteger")) == 0) { 26 26 fprintf(stderr,"Unable to get integer\n"); 27 27 exit(-1); 28 28 } 29 29 fprintf(stdout, "Integer : ***%d***\n",i); 30 if ((f = mr conf_fread("testfloat")) == 0.0) {30 if ((f = mr_conf_fread("testfloat")) == 0.0) { 31 31 fprintf(stderr,"Unable to get float\n"); 32 32 exit(-1); 33 33 } 34 34 fprintf(stdout, "Float : ***%f***\n",f); 35 if (! (s = mr conf_sread("teststring"))) {35 if (! (s = mr_conf_sread("teststring"))) { 36 36 fprintf(stderr,"Unable to get string\n"); 37 37 exit(-1); … … 39 39 fprintf(stdout, "String : ***%s***\n",s); 40 40 paranoid_free(s); 41 mr conf_close();41 mr_conf_close(); 42 42 exit(0); 43 43 } -
trunk/mondo/mondo/test/test-string.c
r561 r768 10 10 #include <stdlib.h> 11 11 #include <stdio.h> 12 12 13 #include "my-stuff.h" 13 #include " libmondo-string.h"14 #include "mr_string.h" 14 15 15 16 main() {
Note:
See TracChangeset
for help on using the changeset viewer.