C0CXPAT0 ; CCDCCR/GPL - XPATH TEST CASES ; 6/1/08
;;1.2;CCD/CCR GENERATION UTILITIES;;Oct 30, 2012;Build 50
;Copyright 2008 George Lilly.
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Affero General Public License as
; published by the Free Software Foundation, either version 3 of the
; License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU Affero General Public License for more details.
;
; You should have received a copy of the GNU Affero General Public License
; along with this program. If not, see .
;
W "NO ENTRY",!
Q
;
;;>
;;>
;;>>>K C0C S C0C=""
;;>>>D PUSH^C0CXPATH("C0C","FIRST")
;;>>>D PUSH^C0CXPATH("C0C","SECOND")
;;>>>D PUSH^C0CXPATH("C0C","THIRD")
;;>>>D PUSH^C0CXPATH("C0C","FOURTH")
;;>>?C0C(0)=4
;;>
;;>>>K GXML S GXML=""
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","@@DATA1@@")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","@@DATA2@@")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>
;;>>>K GXML S GXML=""
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","DATA1")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","DATA2")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","<_SECOND>")
;;>>>D PUSH^C0CXPATH("GXML","DATA3")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>>>D PUSH^C0CXPATH("GXML","")
;;>
;;>>>D ZLOAD^C0CUNIT("ZTMP","C0CXPAT0")
;;>>>D ZTEST^C0CUNIT(.ZTMP,"INIT")
;;>>?C0C(C0C(0))="FOURTH"
;;>>>D POP^C0CXPATH("C0C",.GX)
;;>>?GX="FOURTH"
;;>>?C0C(C0C(0))="THIRD"
;;>>>D POP^C0CXPATH("C0C",.GX)
;;>>?GX="THIRD"
;;>>?C0C(C0C(0))="SECOND"
;;>
;;>>>D ZLOAD^C0CUNIT("ZTMP","C0CXPAT0")
;;>>>D ZTEST^C0CUNIT(.ZTMP,"INIT")
;;>>>S GX=""
;;>>>D MKMDX^C0CXPATH("C0C",.GX)
;;>>?GX="//FIRST/SECOND/THIRD/FOURTH"
;;>
;;>>?$$XNAME^C0CXPATH("DATA1")="FOURTH"
;;>>?$$XNAME^C0CXPATH("")="SIXTH"
;;>>?$$XNAME^C0CXPATH("")="THIRD"
;;>
;;>>>D ZLOAD^C0CUNIT("ZTMP","C0CXPAT0")
;;>>>D ZTEST^C0CUNIT(.ZTMP,"INITXML")
;;>>>D INDEX^C0CXPATH("GXML")
;;>>?GXML("//FIRST/SECOND")="2^12"
;;>>?GXML("//FIRST/SECOND/THIRD")="3^9"
;;>>?GXML("//FIRST/SECOND/THIRD/FIFTH")="5^7"
;;>>?GXML("//FIRST/SECOND/THIRD/FOURTH")="4^4^@@DATA1@@"
;;>>?GXML("//FIRST/SECOND/THIRD/SIXTH")="8^8^"
;;>>?GXML("//FIRST/SECOND")="2^12"
;;>>?GXML("//FIRST")="1^13"
;;>
;;>>>D ZTEST^C0CXPATH("INITXML2")
;;>>>D INDEX^C0CXPATH("GXML")
;;>>?GXML("//FIRST/SECOND")="2^12"
;;>>?GXML("//FIRST/SECOND/_SECOND")="9^11"
;;>>?GXML("//FIRST/SECOND/_SECOND/FOURTH")="10^10^DATA3"
;;>>?GXML("//FIRST/SECOND/THIRD")="3^8"
;;>>?GXML("//FIRST/SECOND/THIRD/FOURTH[1]")="4^4^DATA1"
;;>>?GXML("//FIRST")="1^13"
;;>
;;>>>D ZTEST^C0CXPATH("INITXML")
;;>>>S OUTARY="^TMP($J,""MISSINGTEST"")"
;;>>>D MISSING^C0CXPATH("GXML",OUTARY)
;;>>?@OUTARY@(1)="DATA1"
;;>>?@OUTARY@(2)="DATA2"
;;>