- Timestamp:
- Jul 27, 2013, 6:45:40 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/test/test-mr_stresc.c
r3141 r3170 17 17 char *strl[] = { 18 18 "test with space", 19 "test with \ backslash",19 "test with \\ backslash", 20 20 "test with \" doublequote", 21 21 "test with ' simplequote", … … 26 26 "test with * star", 27 27 "test with | pipe", 28 "test with \\' backslash quote", 29 "test with nothing SPECIAL 1234", 30 "test with rtmp:_ retrieval with rtmpdump and tcpdump « Pxnh's Blog_files", 31 NULL 28 32 }; 29 // Number of strings30 const int MAX = 10;31 33 32 34 int main() { … … 35 37 int i; 36 38 37 for (i = 1; i <= MAX ; i++) { 39 for (i = 1; strl[i] != NULL ; i++) { 40 printf("Test %2d Original chain is %s\n",i,strl[i]); 38 41 p = mr_stresc(strl[i], "`$\\\"(){}'[]&*?|!#~", '\\'); 39 printf("Original chain is %s\n",strl[i]); 40 printf("Transformed chain is %s\n",p); 42 printf("Test %2d Transformed chain is %s\n",i,p); 41 43 } 42 44 exit(0);
Note:
See TracChangeset
for help on using the changeset viewer.