Commits

ZyX_I committed 0064c39

Added check for haskey variable support

  • Participants
  • Parent commits 3a84cfd

Comments (0)

Files changed (4)

plugin/frawor/fwc/compiler.vim

             let self.nargs[-1]+=1
         endfor
     endif
+    " TODO
     return self
 endfunction
 "▶1 tolstofstr     :: CTree::[String|CTree] → [String]
 plugin/frawor/fwc/compiler:keymis
 plugin/frawor/fwc/compiler:keysmis
 plugin/frawor/fwc/compiler:keysmis
+plugin/frawor/fwc/compiler:keysmis
+plugin/frawor/fwc/compiler:keymis
 ::: Section <Checks/Built-in checks/isfunc>
 plugin/frawor/fwc/compiler:nsfunc
 plugin/frawor/fwc/compiler:nsfunc

test/fwctests.dat

 ['haskey abc, def', 'check'], [{'abc': 1}],         0
 ['haskey abc, def', 'check'], [{'abc':1, 'def':1}], 1
 ['haskey abc',      'check'], [{'abc': 1}],         1
+['haskey $k1, abc', 'check'], [{'abc': 1}],         0
+['haskey $k1, abc', 'check'], [{'abc':1, 'def':1}], 1
+['haskey $k1',      'check'], [{'abc': 1}],         0
+['haskey $k1',      'check'], [{'def': 1}],         1
 #▶3 isfunc
 ['isfunc',          'check'], [function("tr")],     1
 ['isfunc',          'check'], [function("s:Eval")], 0

test/rtp/plugin/fwccheck.vim

 let s:regex='\v.'
 let s:replacement='def'
 let s:flags='g'
+let s:k1='def'
 for line in readfile('fwctests.dat')
     if empty(line)
         continue