Commits

ZyX_I  committed b3b3291

Added ignoredeps-feature test

  • Participants
  • Parent commits 1b7a8cf

Comments (0)

Files changed (4)

File test/ignoredeps-feature.in

+:let &rtp.=",".escape($TESTDIR, ',\').'/rtp'
+:let g:testfile="plugin/ignoredeps-feature.vim"
+:source test.vim

File test/ignoredeps-feature.ok

+load: plugin/frawor
+load: plugin/writefile-feature
+load: plugin/ignoredeps-feature

File test/rtp/plugin/ignoredeps-feature.vim

+execute frawor#Setup('0.0', {'plugin/writefile-feature': '0'}, 1)
+function s:F.testfeaturecons(plugdict)
+    call s:F._frawor.writefile('cons: '.a:plugdict.id)
+endfunction
+function s:F.testfeatureload(plugdict)
+    call s:F._frawor.writefile('load: '.a:plugdict.id)
+endfunction
+function s:F.testfeatureunload(plugdict)
+    call s:F._frawor.writefile('unload: '.a:plugdict.id)
+endfunction
+function s:F.testfeatureunloadpre(plugdict)
+    call s:F._frawor.writefile('unloadpre: '.a:plugdict.id)
+endfunction
+call s:F._frawor.newfeature('testfeature', {'cons': s:F.testfeaturecons,
+            \                               'load': s:F.testfeatureload,
+            \                             'unload': s:F.testfeatureunload,
+            \                          'unloadpre': s:F.testfeatureunloadpre,
+            \                         'ignoredeps': 1,})
+

File test/rtp/plugin/writefile-feature.vim

+execute frawor#Setup('0.0', {'plugin/writefile-feature': '0'}, 1)
+function s:F.writefile(plugdict, ...)
+    let r=[]
+    if filereadable(g:outfile)
+        let r+=readfile(g:outfile, 'b')
+    endif
+    let r+=a:000
+    return writefile(r, g:outfile, 'b')
+endfunction
+call s:F._frawor.newfeature('writefile', {'cons': s:F.writefile})
+