Changeset 3170


Ignore:
Timestamp:
Jul 27, 2013, 6:45:40 PM (6 years ago)
Author:
bruno
Message:
  • Extend tests on mr_stresc in order to solve #673
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/test/test-mr_stresc.c

    r3141 r3170  
    1717char *strl[] = {
    1818        "test with space",
    19         "test with \ backslash",
     19        "test with \\ backslash",
    2020        "test with \" doublequote",
    2121        "test with ' simplequote",
     
    2626        "test with * star",
    2727        "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
    2832};
    29 // Number of strings
    30 const int MAX = 10;
    3133
    3234int main() {
     
    3537        int i;
    3638
    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]);
    3841                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);
    4143        }
    4244exit(0);
Note: See TracChangeset for help on using the changeset viewer.