ArrayMac > Function display > TEST_ram_140929

     ∇ r←TEST_ram_140929;ckFnExists;unless;aOk;aEq;on;chkFeature;ckObExists;chkFeatureLine;tfuuN;tfuu;urlV;dt;dt1;rc;hd;fm;dt2;url2;url4;url3;webget;actV
[1]   ⍝∇ 20140929/20151121 ra⌈ --()-- test "ram_140929"                                                                                                  
[2]    test_start                                                                                                                                        
[3]    r←0                                                                                                                                               
[4]    unless←{(~⍵)/⍺}                                                                                                                                   
[5]    aOk←#.Assert                                                                                                                                      
[6]    aEq←#.AssertEq                                                                                                                                    
[7]    on←{⍺ ⍵}                                                                                                                                          
[8]   ⍝⍝--------                                                                                                                                         
[9]    ckObExists←{(⍵ omrepl'missing "⍵"')AssertEq ⍺ on ⍬⍴⎕NC ⍵}                                                                                         
[10]   ckFnExists←3∘ckObExists                                                                                                                           
[11]   chkFeature←{⍺←0 ⋄ ('Requirement:',⍵)aEq 1 ⍺}                                                                                                      
[12]   chkFeatureLine←{⍺←0 ⋄ ⍺ chkFeature'⍝⍝--'{(1+(⍬⍴⍴⍺)+⍬⍴where ⍺⍷⍵)↓⍵}(1 atpars 2⌷[1]qSI'')FNline ⍵}                                                 
[13]   ⍝⍝--                                                                                                                                              
[14]   tfuuN←'ram_140929'                                                                                                                                
[15]   :If 0                                                                                                                                             
[16]       :If ~ckFnExists{⍵}tfuuN                                                                                                                       
[17]           ⎕←APLPmtMFS tfuuN                                                                                                                         
[18]           →XIT                                                                                                                                      
[19]       :EndIf                                                                                                                                        
[20]       tfuu←⍎tfuuN                                                                                                                                   
[21]   :EndIf                                                                                                                                            
[22]   ⍝⍝--                                                                                                                                              
[23]   webget←ramconga.Samples.HTTPGet                                                                                                                   
[24]                                                                                                                                                     
[25]   urlV←'http://phpcrossref.com/xref/sugarcrm/nav.html?index.html'                                                                                   
[26]                                                                                                                                                     
[27]   urlV←'http://phpcrossref.com/xref/sugarcrm/nav.html?index.html'                                                                                   
[28]   rc hd dt←webget urlV                                                                                                                              
[29]   →fail unless aEq 0 rc                                                                                                                             
[30]   dt1←qTCLF qTCNL TEXTREPL dt                                                                                                                       
[31]   :If ~aOk'navframe.html'{(⊂⍺)∊⍵}actV←'src' 'src="{{src}}"'reMatchall dt1                                                                           
[32]       ⎕←⍴actV                                                                                                                                       
[33]       →fail                                                                                                                                         
[34]   :EndIf                                                                                                                                            
[35]                                                                                                                                                     
[36]   rc hd dt←webget(('Seeking'at ⎕LC[1]),':')∘,showFoo('/'PATHarea urlV),'/navframe.html'                                                             
[37]   →fail unless aEq 0 rc                                                                                                                             
[38]   dt1←qTCLF qTCNL TEXTREPL dt                                                                                                                       
[39]                                                                                                                                                     
[40]   ⎕←'navframe.html src''s:'                                                                                                                         
[41]   ⎕←quote'src' 'src="{{src}}"'reMatchall dt1                                                                                                        
[42]                                                                                                                                                     
[43]                                                                                                                                                     
[44]   url2←'\/'TEXTREPL('/'PATHarea urlV)FPN'_crossref/jstree/tree.js' ⍝⍝ tree handling code                                                            
[45]   url3←'\/'TEXTREPL('/'PATHarea urlV)FPN'_crossref/navframe.js'    ⍝⍝ tree definition code                                                          
[46]   url4←'\/'TEXTREPL('/'PATHarea urlV)FPN'_crossref/jstree/tree_tpl.js'                                                                              
[47]  ∆∆get:                                                                                                                                             
[48]   rc hd dt←webget(('Seeking'at ⎕LC[1]),':')∘,showFoo url2                                                                                           
[49]   →fail unless aEq 0 rc                                                                                                                             
[50]   dt1←qTCLF qTCNL TEXTREPL dt                                                                                                                       
[51]                                                                                                                                                     
[52]   ⎕←0 APLPmt'webget←ramconga.Samples.HTTPGet'                                                                                                       
[53]   ⎕←0 APLPmt'rc hd dt←webget',quote url3                                                                                                            
[54]   ⎕←0 APLPmt'dt1←qTCLF qTCNL TEXTREPL dt'                                                                                                           
[55]   ⎕←0 APLPmt')ed dt1'                                                                                                                               
[56]                                                                                                                                                     
[57]   ⎕←FNline 1+∆∆get                                                                                                                                  
[58]                                                                                                                                                     
[59]   :If 1{⍺}~qoExists MyFile'phpcrossref.tree_js'                                                                                                     
[60]       ⎕←0 APLPmt'clipSet dt1'                                                                                                                       
[61]       ⎕←0 APLPmt'fm←MORE_html',quote'http://jsbeautifier.org/'                                                                                      
[62]       ⍝  {}'Wait'to fm  ⍝ form comes up, browses to url, manual pasting, processing, copying goes on, form closes                                   
[63]       ⎕←0 APLPmt'dt2←clipGet'''''                                                                                                                   
[64]       ⎕←0 APLPmt')ed dt2'                                                                                                                           
[65]       ⎕←0 APLPmt'MyFile ''phpcrossref.tree_js'' qoSet dt2'                                                                                          
[66]   :EndIf                                                                                                                                            
[67]                                                                                                                                                     
[68]   →fail unless 0 chkFeature'Find definition of Tree'                                                                                                
[69]   →fail unless 0 chkFeature'Find definition of Tree handling code'                                                                                  
[70]                                                                                                                                                     
[71]                                                                                                                                                     
[72]                                                                                                                                                     
[73]   :If 0                                                                                                                                             
[74]   :OrIf ~0 chkFeature tfuuN omrepl'Get a handle on exp/comp''ible trees'                                                                            
[75]       ⎕←APLPmtMFS'TEST_',tfuuN                                                                                                                      
[76]       →XIT                                                                                                                                          
[77]   :EndIf                                                                                                                                            
[78]   ⍝⍝--                                                                                                                                              
[79]   :If 0                                                                                                                                             
[80]   :OrIf ~0 chkFeature tfuuN omrepl'implement "⍵"'                                                                                                   
[81]       ⎕←APLPmtMFS'TEST_',tfuuN                                                                                                                      
[82]       →XIT                                                                                                                                          
[83]   :EndIf                                                                                                                                            
[84]   r←1                                                                                                                                               
[85]   →XIT                                                                                                                                              
[86]  fail:                                                                                                                                              
[87]   ⎕←APLPmtMFS ThisFN''                                                                                                                              
[88]  XIT: ⍝⍝-------                                                                                                                                     
[89]   test_complete                                                                                                                                     
     ∇                                                                                                                                                   

Page served at: Wed, 08 Apr 2020 05:51:06 AST.