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.92 2004/02/28 23:23:46 nilsson Exp $ */ + /* $Id: test_pike.pike,v 1.93 2004/03/06 01:31:10 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:396:    {    successes=errors=0;    testloop:    foreach(testsuites, string testsuite)    {    tests = read_tests( testsuite );       werror("Doing tests in %s (%d tests)\n", testsuite, sizeof(tests));    int qmade, qskipped, qmadep, qskipp;    +  int testno, testline;    for(e=start;e<sizeof(tests);e++)    {    signal_watchdog();       int skip=0, prev_errors = errors;    object o;    mixed a,b;       // Extra consistency checks?    if(check)
pike.git/bin/test_pike.pike:430:    {    int tmp;    if(!(tmp=cond_cache[condition]))    {    mixed err = catch {    tmp=!!(compile_string("mixed c() { return "+condition+"; }",    "Cond "+(e+1))()->c());    };       if(err) { -  werror( "\nConditional %d failed:\n" -  "%s\n", e+1, describe_backtrace(err) ); +  werror( "\nConditional %d %s failed:\n" +  "%s\n", e+1, testline?"(line "+testline+")":"", +  describe_backtrace(err) );    errors++;    tmp = -1;    }       if(!tmp) tmp=-1;    cond_cache[condition]=tmp;    }       if(tmp==-1)    {
pike.git/bin/test_pike.pike:453:    werror("Not doing test "+(e+1)+"\n");    successes++;    skipped++;    skip=1;    }    }       string|int type;    sscanf(test, "%s\n%s", type, test);    -  int testno, testline; +     string testfile;    sscanf(type, "%s: test %d, expected result: %s", testfile, testno, type);       if (testfile) {    array split = testfile / ":";    testline = (int) split[-1];    testfile = split[..sizeof (split) - 2] * ":";    }       string pad_on_error = "\n";