Branch: Tag:

1998-01-03

1998-01-03 07:13:06 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

now works better with NT

Rev: NT/tools/lib:1.3
Rev: bin/test_pike.pike:1.5
Rev: lib/modules/Stdio.pmod:1.7
Rev: src/fdlib.c:1.2
Rev: src/fdlib.h:1.2
Rev: src/modules/Image/font.c:1.24
Rev: src/modules/files/efuns.c:1.42
Rev: src/modules/files/file.c:1.64
Rev: src/modules/files/socket.c:1.21
Rev: src/modules/files/testsuite.in:1.7
Rev: src/port.c:1.14
Rev: src/testsuite.in:1.63
Rev: src/threads.c:1.50
Rev: src/threads.h:1.24

1:   #!/usr/local/bin/pike    - /* $Id: test_pike.pike,v 1.4 1997/05/31 22:03:40 grubba Exp $ */ + /* $Id: test_pike.pike,v 1.5 1998/01/03 07:11:24 hubbe Exp $ */      #include <simulate.h>   
12:   int main(int argc, string *argv)   {    int e, verbose, successes, errors, t, check; -  string *tests; +  string *tests,tmp;    program testprogram;    int start, fail, mem;    int loop=1;
81:    perror("Unknown argument: "+opt+".\n");    exit(1);    } -  tests=(read_bytes(argv[e])||"")/"\n....\n"; +  tmp=read_bytes(argv[e]); +  if(!tmp) +  { +  perror("Failed to read test file, errno="+errno()+".\n"); +  exit(1);    }    } -  -  if(!tests) -  { -  tests=(clone((program)"/precompiled/file","stdin")->read(0x7fffffff)||"")/"\n....\n"; +     }    -  if(!tests) +  if(!tmp)    { -  perror("Failed to read test file!\n"); +  tmp=Stdio.stdin->read(0x7fffffff); +  if(!tmp) +  { +  perror("Failed to read test file, errno="+errno()+".\n");    exit(1);    } -  +  }    -  +  +  tests=tmp/"\n....\n";    tests=tests[0..sizeof(tests)-2];       while(loop--)