pike.git / bin / test_pike.pike

version» Context lines:

pike.git/bin/test_pike.pike:1:   #!/usr/local/bin/pike    - /* $Id: test_pike.pike,v 1.50 2000/07/26 16:56:42 nilsson Exp $ */ + /* $Id: test_pike.pike,v 1.51 2000/07/28 00:35:50 nilsson Exp $ */      import Stdio;      #if !constant(_verify_internals)   #define _verify_internals()   #endif      #if !constant(_dmalloc_set_name)   void _dmalloc_set_name(mixed ... args) {}   #endif
pike.git/bin/test_pike.pike:339:    {    werror("Failed to read test file, errno="+errno()+".\n");    exit(1);    }       tests=tmp/"\n....\n";    tmp=0;    tests=tests[0..sizeof(tests)-2];       werror("Doing tests in %s (%d tests)\n",argv[f],sizeof(tests)); +  int qmade, qskipped, qmadep, qskipp;       for(e=start;e<sizeof(tests);e++)    {    signal_watchdog();       int skip=0;    string test,condition;    string|int type;    object o;    mixed a,b;
pike.git/bin/test_pike.pike:401:    skipped++;    skip=1;    }    }          if(istty())    {    if(!verbose)    werror("%6d\r",e+1); -  }else if(!quiet) { +  }else if(quiet){ +  if(skip) { +  if(qmade) werror(" Made %d test%s.\n", qmade, qmade==1?"":"s"); +  qmade=0; +  qskipp=1; +  qskipped++; +  } +  else { +  if(qskipped) werror(" Skipped %d test%s.\n", qskipped, qskipped==1?"":"s"); +  qskipped=0; +  qmadep=1; +  qmade++; +  } +  }else{    /* Use + instead of . so that sendmail and    * cron will not cut us off... :(    */    switch( (e-start) % 50)    {    case 0:    werror("%5d: ",e);    break;       case 9:
pike.git/bin/test_pike.pike:660:    exit(1);       if(!--end) break;       a=b=0;    }       if(istty())    {    werror(" \r"); -  }else if(!quiet) { +  }else if(quiet){ +  if(!qskipp && !qmadep); +  else if(!qskipp) werror("Made all tests\n"); +  else if(!qmadep) werror("Skipped all tests\n"); +  else if(qmade) werror(" Made %d test%s.\n", qmade, qmade==1?"":"s"); +  else if(qskipped) werror(" Skipped %d test%s.\n", qskipped, qskipped==1?"":"s"); +  }else{    werror("\n");    }    }    if(mem)    {    int total;    tests=0;    gc();    mapping tmp=_memory_usage();    write(sprintf("%-10s: %6s %10s\n","Category","num","bytes"));