Nice/src/nice/tools/unit/console main.nice,1.7,1.8

Artem Gr Kozarezov <[email protected]> Thu, 23 Jun 2005 08:28:02 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/nice/tools/unit/console
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11627/src/nice/tools/unit/console

Modified Files:
	main.nice 
Log Message:
An option to invoke System.exit when finished.

Index: main.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/console/main.nice,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** main.nice	18 Apr 2005 18:03:25 -0000	1.7
--- main.nice	23 Jun 2005 08:27:59 -0000	1.8
***************
*** 17,20 ****
--- 17,21 ----
    ?String classpath = null;
    ?String jar = null;
+   boolean systemExit = false;
  
    prg.options =
***************
*** 31,35 ****
  
     option("man", "Print man page to stdout", visible: false,
! 	  () => man(prg))
    ];
  
--- 32,39 ----
  
     option("man", "Print man page to stdout", visible: false,
! 	  () => man(prg)),
!    
!    option("exit", "Invoke System.exit when finished\nExit code will be the number of tests failed",
!     () => { systemExit = true; })
    ];
  
***************
*** 56,59 ****
--- 60,64 ----
  
    println(""listener.nFailures"/"listener.nTests" tests failed");
+   if (systemExit) System.exit(listener.nFailures);
  }
  



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click