Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/io/manipulatorsInput.cfa

    r0860d9c r2fa0237  
    4545                }
    4646
    47                 rep("pre1");    // 123456     |  123456
    48                 rep("pre2");    // 1234567    |  1234567
    49                 rep("pre3a");   // 12345678   |  1234567
    50                 rep("pre3b");   //            |  8
    51                 rep("pre4a");   // 123456789  |  1234567
    52                 rep("pre4b");   //            |  89
    53 
     47                rep("pre1");
     48                rep("pre2a");
     49                rep("pre2b");
    5450                scanf("\n");  // next test does not start with %s so does not tolerate leading whitespace
    5551        }
    5652        {
    5753                char s[] = "yyyyyyyyyyyyyyyyyyyy";
    58                 const char sk_fmt[] = "%*[abc]";
    59                 scanf( "abc " ); scanf( sk_fmt ); for ( 5 ) scanf( "%*c" ); printf( "1 %s\n", s );
     54                const char sk[] = "abc";
     55                scanf( "abc " ); scanf( sk ); for ( 5 ) scanf( "%*c" ); printf( "1 %s\n", s );
    6056                scanf( "%s", s );                                                               printf( "2 %s\n", s );
    6157                scanf( "%*s" );                                                                 printf( "3 %s\n", s );
     
    7167                scanf( "%*8[abc]" );                                                    printf( "12 %s\n", s );
    7268                scanf( "%*8[^abc]" );                                                   printf( "13 %s\n", s );
    73 
    74                 int rc;
    75                 s[0] = 'q'; s[1] = '\0'; rc = 99;
    76                 rc = scanf( "%[abc]", s );                                              printf( "14 rc=%d, %s\n", rc, s );
    77                 s[0] = 'q'; s[1] = '\0'; rc = 99;
    78                 rc = scanf( "%[^u]", s );                                               printf( "15 rc=%d, %s\n", rc, s );
    79                 scanf( "%*[u]" );
    80                 scanf("\n");
    8169        }
    8270        {
     
    9785                sin | ignore( incl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "12" | s;
    9886                sin | ignore( excl( "abc", wdi( sizeof(s), 8, s ) ) ); sout | "13" | s;
    99 
    100                 s[0] = 'q'; s[1] = '\0';
    101                 sin | incl( "abc", wdi( sizeof(s), s ) );               sout | "14" | s;
    102                 s[0] = 'q'; s[1] = '\0';
    103                 sin | excl( "u", wdi( sizeof(s), s ) );                 sout | "15" | s;
    104                 sin | skip( "u" );
    105                 sin | "\n";
    10687        }
    10788    /* Keep harmonized with collections/string-istream-manip */
Note: See TracChangeset for help on using the changeset viewer.