Branch: Tag:

1999-04-08

1999-04-08 22:19:14 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more anal testsuite

Rev: bin/install.pike:1.11
Rev: bin/test_pike.pike:1.23
Rev: src/Makefile.in:1.137

1:   #!/usr/local/bin/pike    - /* $Id: test_pike.pike,v 1.22 1999/03/12 01:11:55 hubbe Exp $ */ + /* $Id: test_pike.pike,v 1.23 1999/04/08 22:19:01 hubbe Exp $ */      import Stdio;   
20:   #define HAVE_DEBUG   #endif    + void bzot(string test) + { +  int line=1; +  int tmp=strlen(test)-1; +  while(test[tmp]=='\n') tmp--; +  foreach(test[..tmp]/"\n",string s) +  werror("%3d: %s\n",line++,s); + } +    int main(int argc, string *argv)   {    int e, verbose, successes, errors, t, check;
165:    if(verbose)    {    werror("Doing test %d (%d total)%s\n",e+1,successes+errors+1,extra_info); -  if(verbose>1) -  werror(test+"\n"); +  if(verbose>1) bzot(test);    }       if(check > 1) _verify_internals();
186:    if(catch(compile_string(test + widener, fname)))    {    werror(fname + " failed.\n"); -  werror(test+"\n"); +  bzot(test);    errors++;    }else{    successes++;
200:    successes++;    }else{    werror(fname + " failed.\n"); -  werror(test+"\n"); +  bzot(test);    errors++;    }    master()->set_inhibit_compile_errors(0);
213:    successes++;    }else{    werror(fname + " failed.\n"); -  werror(test+"\n"); +  bzot(test);    errors++;    }    master()->set_inhibit_compile_errors(0);
248:    if(a)    {    werror(fname + " failed.\n"); -  werror(test+"\n"); +  bzot(test);    werror(sprintf("o->a(): %O\n",a));    errors++;    }else{
260:    if(!a)    {    werror(fname + " failed.\n"); -  werror(test+"\n"); +  bzot(test);    werror(sprintf("o->a(): %O\n",a));    errors++;    }else{
276:    if(a!=b)    {    werror(fname + " failed.\n"); -  werror(test+"\n"); +  bzot(test);    werror(sprintf("o->a(): %O\n",a));    werror(sprintf("o->b(): %O\n",b));    errors++;
289:    if(!equal(a,b))    {    werror(fname + " failed.\n"); -  werror(test+"\n"); +  bzot(test);    werror(sprintf("o->a(): %O\n",a));    werror(sprintf("o->b(): %O\n",b));    errors++;