Changeset 836 in openpam


Ignore:
Timestamp:
Oct 28, 2014, 5:47:55 PM (7 years ago)
Author:
Dag-Erling Smørgrav
Message:

Further improve the line continuation tests.

Location:
trunk/t
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/t_openpam_readlinev.c

    r835 r836  
    232232
    233233        tf = t_fopen(NULL);
    234         t_fprintf(tf, " \\\n \n");
    235         t_frewind(tf);
    236         ret = orlv_expect(tf, empty, 2 /*lines*/, 0 /*eof*/) &&
     234        t_fprintf(tf, "%s \\\n %s\n", hello_world[0], hello_world[1]);
     235        t_frewind(tf);
     236        ret = orlv_expect(tf, hello_world, 2 /*lines*/, 0 /*eof*/) &&
    237237            orlv_expect(tf, NULL, 0 /*lines*/, 1 /*eof*/);
    238238        t_fclose(tf);
  • trunk/t/t_openpam_readword.c

    r830 r836  
    903903
    904904        tf = t_fopen(NULL);
    905         t_fprintf(tf, " \\\n \n");
    906         t_frewind(tf);
    907         ret = orw_expect(tf, NULL, 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);
     905        t_fprintf(tf, "hello \\\n world\n");
     906        t_frewind(tf);
     907        ret = orw_expect(tf, "hello", 1 /*lines*/, 0 /*eof*/, 0 /*eol*/) &&
     908            orw_expect(tf, "world", 0 /*lines*/, 0 /*eof*/, 1 /*eol*/);
    908909        t_fclose(tf);
    909910        return (ret);
     
    916917
    917918        tf = t_fopen(NULL);
    918         t_fprintf(tf, "xyzzy\\\n \n");
    919         t_frewind(tf);
    920         ret = orw_expect(tf, "xyzzy", 1 /*lines*/, 0 /*eof*/, 0 /*eol*/) &&
    921             orw_expect(tf, NULL, 0 /*lines*/, 0 /*eof*/, 1 /*eol*/);
     919        t_fprintf(tf, "hello\\\n world\n");
     920        t_frewind(tf);
     921        ret = orw_expect(tf, "hello", 1 /*lines*/, 0 /*eof*/, 0 /*eol*/) &&
     922            orw_expect(tf, "world", 0 /*lines*/, 0 /*eof*/, 1 /*eol*/);
    922923        t_fclose(tf);
    923924        return (ret);
     
    930931
    931932        tf = t_fopen(NULL);
    932         t_fprintf(tf, " \\\nxyzzy\n");
    933         t_frewind(tf);
    934         ret = orw_expect(tf, "xyzzy", 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);
     933        t_fprintf(tf, "hello \\\nworld\n");
     934        t_frewind(tf);
     935        ret = orw_expect(tf, "hello", 0 /*lines*/, 0 /*eof*/, 0 /*eol*/) &&
     936            orw_expect(tf, "world", 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);
    935937        t_fclose(tf);
    936938        return (ret);
     
    943945
    944946        tf = t_fopen(NULL);
    945         t_fprintf(tf, "xyz\\\nzy\n");
    946         t_frewind(tf);
    947         ret = orw_expect(tf, "xyzzy", 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);
     947        t_fprintf(tf, "hello\\\nworld\n");
     948        t_frewind(tf);
     949        ret = orw_expect(tf, "helloworld", 1 /*lines*/, 0 /*eof*/, 1 /*eol*/);
    948950        t_fclose(tf);
    949951        return (ret);
Note: See TracChangeset for help on using the changeset viewer.