New TESTALL^GPLUNIT and fixes to GPLXPATH test cases
This commit is contained in:
parent
58976179fd
commit
958a1040ec
|
@ -11,7 +11,7 @@ EXPORT ; EXPORT ENTRY POINT FOR CCR
|
|||
D CCRRPC(.CCRGLO,DFN,"CCR")
|
||||
S OARY=$NA(^TMP($J,DFN,"CCR",1))
|
||||
S ONAM="PAT_"_DFN_"_CCR_V1.xml"
|
||||
S ODIR="/home/wvehr1/EHR/CCR"
|
||||
S ODIR="/home/glilly/CCROUT"
|
||||
D OUTPUT^GPLXPATH(OARY,ONAM,ODIR)
|
||||
Q
|
||||
;
|
||||
|
|
26
p/GPLUNIT.m
26
p/GPLUNIT.m
|
@ -98,6 +98,32 @@ TEST ; RUN ALL THE TEST CASES
|
|||
ZWR ZTMP
|
||||
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
|
||||
; ZARY IS PASSED BY REFERENCE
|
||||
|
|
14
p/GPLXPATH.m
14
p/GPLXPATH.m
|
@ -332,7 +332,11 @@ PARY(GLO) ;PRINT AN ARRAY
|
|||
F I=1:1:@GLO@(0) W @GLO@(I),!
|
||||
Q
|
||||
;
|
||||
TEST ; RUN ALL THE TEST CASES
|
||||
TEST ; Run all the test cases
|
||||
D TESTALL^GPLUNIT("GPLXPATH")
|
||||
Q
|
||||
;
|
||||
OLDTEST ; RUN ALL THE TEST CASES
|
||||
N ZTMP
|
||||
D ZLOAD^GPLUNIT("ZTMP","GPLXPATH")
|
||||
D ZTEST^GPLUNIT(.ZTMP,"ALL")
|
||||
|
@ -464,28 +468,28 @@ TLIST ; LIST THE TESTS
|
|||
;;>>>K G2,GBL
|
||||
;;>>>D ZTEST^GPLXPATH("INITXML")
|
||||
;;>>>D QOPEN^GPLXPATH("GBL","GXML")
|
||||
;;>>?$P(GBL(1),"^",3)=12
|
||||
;;>>?$P(GBL(1),";",3)=12
|
||||
;;>>>D BUILD^GPLXPATH("GBL","G2")
|
||||
;;>>?G2(G2(0))="</SECOND>"
|
||||
;;><QOPEN2>
|
||||
;;>>>K G2,GBL
|
||||
;;>>>D ZTEST^GPLXPATH("INITXML")
|
||||
;;>>>D QOPEN^GPLXPATH("GBL","GXML","//FIRST/SECOND")
|
||||
;;>>?$P(GBL(1),"^",3)=12
|
||||
;;>>?$P(GBL(1),";",3)=11
|
||||
;;>>>D BUILD^GPLXPATH("GBL","G2")
|
||||
;;>>?G2(G2(0))="</SECOND>"
|
||||
;;><QCLOSE>
|
||||
;;>>>K G2,GBL
|
||||
;;>>>D ZTEST^GPLXPATH("INITXML")
|
||||
;;>>>D QCLOSE^GPLXPATH("GBL","GXML")
|
||||
;;>>?$P(GBL(1),"^",3)=13
|
||||
;;>>?$P(GBL(1),";",3)=13
|
||||
;;>>>D BUILD^GPLXPATH("GBL","G2")
|
||||
;;>>?G2(G2(0))="</FIRST>"
|
||||
;;><QCLOSE2>
|
||||
;;>>>K G2,GBL
|
||||
;;>>>D ZTEST^GPLXPATH("INITXML")
|
||||
;;>>>D QCLOSE^GPLXPATH("GBL","GXML","//FIRST/SECOND/THIRD")
|
||||
;;>>?$P(GBL(1),"^",3)=13
|
||||
;;>>?$P(GBL(1),";",3)=13
|
||||
;;>>>D BUILD^GPLXPATH("GBL","G2")
|
||||
;;>>?G2(G2(0))="</FIRST>"
|
||||
;;>>?G2(1)="</THIRD>"
|
||||
|
|
Loading…
Reference in New Issue