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.53 2001/01/01 14:11:27 mirar Exp $ */ + /* $Id: test_pike.pike,v 1.54 2001/11/14 16:44:54 jonasw 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:117: Inside #if defined(WATCHDOG), #if defined(WATCHDOG) and #if defined(WATCHDOG_SIGNAL)
  #ifdef WATCHDOG_SIGNAL    watchdog->kill(signum("SIGQUIT"));   #endif    }   #endif   }   #endif      int main(int argc, array(string) argv)   { -  int e, verbose, successes, errors, t, check; +  int e, verbose, prompt, successes, errors, t, check;    int skipped, quiet;    array(string) tests;    string tmp;    program testprogram;    int start, fail, mem;    int loop=1;    int end=0x7fffffff;    string extra_info="";    int shift;   
pike.git/bin/test_pike.pike:148:    array(string) args=backtrace()[0][3];    array(string) testsuites=({});    args=args[..sizeof(args)-1-argc];    add_constant("RUNPIKE",Array.map(args,Process.sh_quote)*" ");       foreach(Getopt.find_all_options(argv,aggregate(    ({"no-watchdog",Getopt.NO_ARG,({"--no-watchdog"})}),    ({"watchdog",Getopt.HAS_ARG,({"--watchdog"})}),    ({"help",Getopt.NO_ARG,({"-h","--help"})}),    ({"verbose",Getopt.MAY_HAVE_ARG,({"-v","--verbose"})}), +  ({"prompt",Getopt.NO_ARG,({"-p","--prompt"})}),    ({"quiet",Getopt.NO_ARG,({"-q","--quiet"})}),    ({"start",Getopt.HAS_ARG,({"-s","--start-test"})}),    ({"end",Getopt.HAS_ARG,({"--end-after"})}),    ({"fail",Getopt.MAY_HAVE_ARG,({"-f","--fail"})}),    ({"loop",Getopt.MAY_HAVE_ARG,({"-l","--loop"})}),    ({"trace",Getopt.MAY_HAVE_ARG,({"-t","--trace"})}),    ({"check",Getopt.MAY_HAVE_ARG,({"-c","--check"})}),    ({"mem",Getopt.MAY_HAVE_ARG,({"-m","--mem","--memory"})}),    ({"auto",Getopt.MAY_HAVE_ARG,({"-a","--auto"})}),    ({"notty",Getopt.NO_ARG,({"-T","--notty"})}),
pike.git/bin/test_pike.pike:246:   #else    _exit(1);   #endif    break;       case "notty":    istty_cache=-1;    break;       case "help": -  werror("Usage: "+argv[e]+" [-v | --verbose] [-h | --help] [-t <testno>] <testfile>\n"); +  werror("Usage: "+argv[e]+" [-v | --verbose] [-p | --prompt] [-h | --help] [-t <testno>] <testfile>\n");    return 0;       case "verbose": verbose+=foo(opt[1]); break; -  +  case "prompt": prompt+=foo(opt[1]); break;    case "quiet": quiet=1; istty_cache=-1; break;    case "start": start=foo(opt[1]); start--; break;    case "end": end=foo(opt[1]); break;    case "fail": fail+=foo(opt[1]); break;    case "loop": loop+=foo(opt[1]); break;    case "trace": t+=foo(opt[1]); break;    case "check": check+=foo(opt[1]); break;    case "mem": mem+=foo(opt[1]); break;       case "auto":
pike.git/bin/test_pike.pike:449:    }    }    if(skip) continue;          sscanf(test,"%s\n%s",type,test);    sscanf(type,"%*s expected result: %s",type);       if(verbose)    { +  if (prompt) { +  if (Stdio.Readline()-> +  read(sprintf("About to run test: %d. [<RETURN>/'quit']: ", +  e + 1)) == "quit") { +  f = 999999; +  break; +  } +  }    werror("Doing test %d (%d total)%s\n",e+1,successes+errors+1,extra_info);    if(verbose>1) bzot(test);    }       if(check > 1) _verify_internals();       shift++;    string fname = argv[f] + ": Test " + (e + 1) +    " (shift " + (shift%3) + ")";