You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/06/17 23:08:31 UTC

cvs commit: apache-2.0/src/lib/apr/test testfile.c

trawick     00/06/17 14:08:30

  Modified:    src/lib/apr/test testfile.c
  Log:
  Get recently-added tests in testfile.c to work on Win32.  testfile
  was doing some improper ap_ungetc() checks.
  
  Revision  Changes    Path
  1.15      +7 -4      apache-2.0/src/lib/apr/test/testfile.c
  
  Index: testfile.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testfile.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- testfile.c	2000/06/16 16:41:09	1.14
  +++ testfile.c	2000/06/17 21:08:29	1.15
  @@ -462,11 +462,14 @@
                   "doesn't work yet...\n\t\t\t\t ");
       }
       else {
  -        rv = ap_ungetc('z', f);
  +        rv = ap_ungetc('b', f);
           assert(!rv);
  -        rv = ap_ungetc('a', f);
  -        assert(!rv); /* we just overwrote the previously-un-got char */
  -        read_one(f, 'a');
  +        /* Note: some implementations move the file ptr back;
  +         *       others just save up to one char; it isn't 
  +         *       portable to unget more than once.
  +         */
  +        /* Don't do this: rv = ap_ungetc('a', f); */
  +        read_one(f, 'b');
       }
       read_one(f, 'c');
       read_one(f, '\n');