Changeset 30

Show
Ignore:
Timestamp:
03/06/09 13:23:20 (3 years ago)
Author:
mgalloy
Message:

Adding MG_ANSICODE to mgunit. Also adding a COLOR keyword to MGUNIT to force using MG_ANSICODE (even if cmdline_tools are not available).

Location:
trunk/mgunit/src
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/mgunit/src/mgunit.pro

    r26 r30  
    1212;       name of file to send output to; if not present sends output to the  
    1313;       output log 
     14;    color : in, optional, type=boolean 
     15;       set to print color output to the output log 
    1416;    html : in, optional, type=boolean 
    1517;       set to indicate HTML output instead of plain text 
     
    2123;       number of tests       
    2224;- 
    23 pro mgunit, tests, filename=filename, html=html, $ 
     25pro mgunit, tests, filename=filename, html=html, color=color, $ 
    2426            npass=npass, nfail=nfail, ntests=ntests 
    2527  compile_opt strictarr 
     
    2830   
    2931  runnerName = keyword_set(html) ? 'MGutHTMLRunner' : 'MGutCliRunner' 
    30   testRunner->add, obj_new(runnerName, filename=filename) 
     32  testRunner->add, obj_new(runnerName, filename=filename, color=color) 
    3133   
    3234  npass = 0L 
  • trunk/mgunit/src/mgutclirunner__define.pro

    r29 r30  
    216216;       if present, output is sent to that file, otherwise output is sent to  
    217217;       stdout 
    218 ;- 
    219 function mgutclirunner::init, filename=filename 
     218;    color : in, optional, type=boolean 
     219;       set to print color output 
     220;- 
     221function mgutclirunner::init, filename=filename, color=color 
    220222  compile_opt strictarr 
    221223 
     
    236238  self.indent = 3L 
    237239  self.space = (byte(' '))[0] 
    238   self.isTty = self->_findIfTty() 
     240  self.isTty = keyword_set(color) || self->_findIfTty() 
    239241   
    240242  !quiet = 1 
  • trunk/mgunit/src/mguthtmlrunner__define.pro

    r25 r30  
    174174;       if present, output is sent that file, otherwise output is sent to  
    175175;       stdout 
    176 ;- 
    177 function mguthtmlrunner::init, filename=filename 
     176;    color : in, optional, type=boolean 
     177;       unused for MGutHTMLRunner 
     178;- 
     179function mguthtmlrunner::init, filename=filename, color=color 
    178180  compile_opt strictarr 
    179181