ArrayMac > Function display > TEST_ENCTofWikiTable

     ∇ r←TEST_ENCTofWikiTable;ckFnExists;unless;aOk;aEq;on;chkFeature;ckObExists;chkFeatureLine;tfuuN;tfuu;tfinv
[1]   ⍝∇ 20140527/20140601 ra⌈ --()-- test "ENCTofWikiTable"                                                    
[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]   :If 0                                                                                                    
[15]   :OrIf ~ckFnExists{⍵}tfuuN←'ENCTofWikiTable'                                                              
[16]   :OrIf ~AssertEq 1 1 on×2↑1 ⎕AT tfuuN                                                                     
[17]       ⎕←tfuuN omrepl'MyFile qoSave ''⍵'''                                                                  
[18]       →XIT                                                                                                 
[19]   :EndIf                                                                                                   
[20]   tfuu←⍎tfuuN                                                                                              
[21]   tfinv←WikiTableofENCT                                                                                    
[22]                                                                                                            
[23]   →fail unless aEq DISP¨{⍵ on tfuu tfinv ⍵}⍕¨⍳2 3                                                          
[24]                                                                                                            
[25]   →XIT unless 1 chkFeature tfuuN omrepl'implement "⍵"'                                                     
[26]   r←1                                                                                                      
[27]   →XIT                                                                                                     
[28]  fail:                                                                                                     
[29]   ⎕←tfuuN omrepl'MyFile qoSave ''⍵'''                                                                      
[30]  XIT: ⍝⍝-------                                                                                            
[31]   test_complete                                                                                            
     ∇                                                                                                          

Page served at: Wed, 08 Apr 2020 04:47:53 AST.