Index: ccr/trunk/p/GPLUNIT.m
===================================================================
--- ccr/trunk/p/GPLUNIT.m	(revision 24)
+++ ccr/trunk/p/GPLUNIT.m	(revision 27)
@@ -23,6 +23,6 @@
         . S ZARY(BAT)=CNT_"^"_CNT ; FIRST AND LAST TESTS IN BATTERY
         . S ZARY("TESTS",BAT)="" ; PUT THE BATTERY IN THE TESTS INDEX
-	. ; S TN=$NA(ZARY("TESTS"))
-	. ; D PUSH^GPLXPATH(TN,BAT)
+        . ; S TN=$NA(ZARY("TESTS"))
+        . ; D PUSH^GPLXPATH(TN,BAT)
         S ZARY(0)=CNT ; update the array counter
         Q
@@ -52,40 +52,40 @@
        ;
 ZTEST(ZARY,WHICH)   ; try out the tests using a passed array ZTEST
-       	N I,ZX,ZR,ZP
-       	S DEBUG=0
-	; I WHICH="ALL" D  Q ; RUN ALL THE TESTS
-	; . W "DOING ALL",! 
-	; . N J,NT
-	; . S NT=$NA(ZARY("TESTS"))
-	; . W NT,@NT@(0),!
-	; . F J=1:1:@NT@(0) D  ;
-	; . . W @NT@(J),!
-	; . . D ZTEST^GPLUNIT(@ZARY,@NT@(J))
-       	I '$D(ZARY(WHICH))  D  ; TEST SECTION DOESN'T EXIST
-       	. W "ERROR -- TEST SECTION DOESN'T EXIST -> ",WHICH,!
-       	. Q ; EXIT
-       	N FIRST,LAST
-       	S FIRST=$P(ZARY(WHICH),"^",1)
-       	S LAST=$P(ZARY(WHICH),"^",2)
-       	F I=FIRST:1:LAST  D
-       	. I ZARY(I)?1">"1.E  D  ; NOT A TEST, JUST RUN THE STATEMENT
-       	. . S ZP=$E(ZARY(I),2,$L(ZARY(I)))
-       	. . ;  W ZP,!
-       	. . S ZX=ZP
-       	. . W "RUNNING: "_ZP
-       	. . X ZX
-       	. . W "..SUCCESS: ",WHICH,!
-       	. I ZARY(I)?1"?"1.E  D  ; THIS IS A TEST
-       	. . S ZP=$E(ZARY(I),2,$L(ZARY(I)))
-       	. . S ZX="S ZR="_ZP
-       	. . W "TRYING: "_ZP
-       	. . X ZX
-       	. . W $S(ZR=1:"..PASSED ",1:"..FAILED "),!
-       	. . I '$D(TPASSED) D  ; NOT INITIALIZED YET
-       	. . . S TPASSED=0 S TFAILED=0
-       	. . I ZR S TPASSED=TPASSED+1
-       	. . I 'ZR S TFAILED=TFAILED+1
-       	Q
-       	;
+        N I,ZX,ZR,ZP
+        S DEBUG=0
+        ; I WHICH="ALL" D  Q ; RUN ALL THE TESTS
+        ; . W "DOING ALL",!
+        ; . N J,NT
+        ; . S NT=$NA(ZARY("TESTS"))
+        ; . W NT,@NT@(0),!
+        ; . F J=1:1:@NT@(0) D  ;
+        ; . . W @NT@(J),!
+        ; . . D ZTEST^GPLUNIT(@ZARY,@NT@(J))
+        I '$D(ZARY(WHICH))  D  ; TEST SECTION DOESN'T EXIST
+        . W "ERROR -- TEST SECTION DOESN'T EXIST -> ",WHICH,!
+        . Q ; EXIT
+        N FIRST,LAST
+        S FIRST=$P(ZARY(WHICH),"^",1)
+        S LAST=$P(ZARY(WHICH),"^",2)
+        F I=FIRST:1:LAST  D
+        . I ZARY(I)?1">"1.E  D  ; NOT A TEST, JUST RUN THE STATEMENT
+        . . S ZP=$E(ZARY(I),2,$L(ZARY(I)))
+        . . ;  W ZP,!
+        . . S ZX=ZP
+        . . W "RUNNING: "_ZP
+        . . X ZX
+        . . W "..SUCCESS: ",WHICH,!
+        . I ZARY(I)?1"?"1.E  D  ; THIS IS A TEST
+        . . S ZP=$E(ZARY(I),2,$L(ZARY(I)))
+        . . S ZX="S ZR="_ZP
+        . . W "TRYING: "_ZP
+        . . X ZX
+        . . W $S(ZR=1:"..PASSED ",1:"..FAILED "),!
+        . . I '$D(TPASSED) D  ; NOT INITIALIZED YET
+        . . . S TPASSED=0 S TFAILED=0
+        . . I ZR S TPASSED=TPASSED+1
+        . . I 'ZR S TFAILED=TFAILED+1
+        Q
+        ;
 TEST   ; RUN ALL THE TEST CASES
       N ZTMP
@@ -99,4 +99,30 @@
       Q
       ;
+GTSTS(ZARY,RTN) ; return an array of test names
+        N I,J S I="" S I=$O(ZARY("TESTS",I))
+        F J=0:0  Q:I=""  D
+        . D PUSH^GPLXPATH(RTN,I)
+        . S I=$O(ZARY("TESTS",I))
+        Q
+        ;
+TESTALL(RNM) ; RUN ALL THE TESTS
+        N I,J,ZTMP,TSTS,TOTP,TOTF
+        S TOTP=0 S TOTF=0
+        D ZLOAD^GPLUNIT("ZTMP",RNM)
+        D GTSTS(.ZTMP,"TSTS")
+        F I=1:1:TSTS(0) D  ;
+        . S TPASSED=0 S TFAILED=0
+        . D ZTEST(.ZTMP,TSTS(I))
+        . S TOTP=TOTP+TPASSED
+        . S TOTF=TOTF+TFAILED
+        . S $P(TSTS(I),"^",2)=TPASSED
+        . S $P(TSTS(I),"^",3)=TFAILED
+        F I=1:1:TSTS(0) D  ;
+        . W "TEST=> ",$P(TSTS(I),"^",1)
+        . W " PASSED=>",$P(TSTS(I),"^",2)
+        . W " FAILED=>",$P(TSTS(I),"^",3),!
+        W "TOTAL=> PASSED:",TOTP," FAILED:",TOTF,!
+        Q
+        ;
 TLIST(ZARY) ; LIST ALL THE TESTS
      ; THEY ARE MARKED AS ;;><TESTNAME> IN THE TEST CASES
