pike.git / bin / test_pike.pike

version» Context lines:

pike.git/bin/test_pike.pike:1:   #! /usr/bin/env pike    - /* $Id: test_pike.pike,v 1.99 2004/04/23 16:38:45 grubba Exp $ */ + /* $Id: test_pike.pike,v 1.100 2004/05/02 01:51:56 nilsson Exp $ */      #if !constant(_verify_internals)   #define _verify_internals()   #endif      #if !constant(_dmalloc_set_name)   void _dmalloc_set_name(mixed ... args) {}   #endif      int foo(string opt)
pike.git/bin/test_pike.pike:64:   }      array(string) read_tests( string fn ) {    string|array(string) tests = Stdio.read_file( fn );    if(!tests) {    werror("Failed to read test file %O, errno=%d.\n",    fn, errno());    exit(1);    }    +  if(has_prefix(tests, "START")) { +  tests = tests[6..]; +  if(!has_suffix(tests, "END\n")) +  werror("%s: Missing end marker.\n", fn); +  else +  tests = tests[..sizeof(tests)-1-4]; +  } +     tests = tests/"\n....\n";    return tests[0..sizeof(tests)-2];   }      class WarningFlag {    int(0..1) warning;    array(string) warnings = ({});       void compile_warning(string file, int line, string text) {    warnings += ({ line+": "+text });