Commits

ZyX_I committed 90bafdb

Added recursive-dependent-with-features test

Comments (0)

Files changed (7)

plugin/frawor.vim

     let a:plugdict.features.newfeature[feature.id]=feature
     let s:g.features[feature.id]=feature
     "▶2 Running addfeature() and register()
-    " FIXME test it
     " XXX We do not actuall want a list, just missing comma operator
     if has_key(feature, 'ignoredeps')
         call map(values(s:g.pls), '[s:F.addfeature(v:val, feature)'.

test/missingmsgs.lst

-invloadarg
-mesnotstr
-ncall
-nfref
-nomessage
-nomessages
-_plstatuses
-unotloaded

test/recursive-dependent-with-features.in

+:let &rtp.=",".escape($TESTDIR, ',\').'/rtp'
+:let g:testfile="plugin/recursive-dependent-with-features.3.vim"
+:redir => g:messages
+:source test.vim
+:redir END
+:call call("WriteFile", map(split(g:messages, "\n"), 'substitute(v:val, ''^Frawor:\%(\\.\|[^:]\)\+:\%(\\.\|[^:]\)\+\zs:.*'', "", "")'))

test/recursive-dependent-with-features.ok

++++ plugin/recursive-dependent-with-features
+plugin/recursive-dependent-with-features: newfeature throw warn write1
+---
++++ plugin/recursive-dependent-with-features.2
+plugin/recursive-dependent-with-features.2: newfeature throw warn write1 write2
+plugin/recursive-dependent-with-features.2: newfeature throw warn write1 write2
+---
++++ plugin/recursive-dependent-with-features.3
+plugin/recursive-dependent-with-features.3: newfeature throw warn write1 write2
+plugin/recursive-dependent-with-features.3: newfeature throw warn write1 write2
+---
+Frawor:plugin/frawor:recdep

test/rtp/plugin/recursive-dependent-with-features.2.vim

+execute frawor#Setup('0.0', {'plugin/recursive-dependent-with-features':   '0.0',
+            \                'plugin/recursive-dependent-with-features.2': '0.0'}, 1)
+function s:F.writefeature(plugdict)
+    call WriteFile(a:plugdict.id.': '.join(sort(keys(s:F._frawor))))
+endfunction
+call s:F._frawor.newfeature('write2', {'cons': s:F.writefeature})
+call WriteFile('+++ '.s:g._frawor.id)
+if has_key(s:F._frawor, 'write1')
+    call s:F._frawor.write1()
+endif
+if has_key(s:F._frawor, 'write2')
+    call s:F._frawor.write2()
+endif
+call WriteFile('---')
+

test/rtp/plugin/recursive-dependent-with-features.3.vim

+execute frawor#Setup('0.0', {'plugin/recursive-dependent-with-features':   '0.0',
+            \                'plugin/recursive-dependent-with-features.2': '0.0'}, 1)
+call WriteFile('+++ '.s:g._frawor.id)
+if has_key(s:F._frawor, 'write1')
+    call s:F._frawor.write1()
+endif
+if has_key(s:F._frawor, 'write2')
+    call s:F._frawor.write2()
+endif
+call WriteFile('---')
+

test/rtp/plugin/recursive-dependent-with-features.vim

+execute frawor#Setup('0.0', {'plugin/recursive-dependent-with-features.2': '0.0',
+            \                'plugin/recursive-dependent-with-features':   '0.0'}, 1)
+function s:F.writefeature(plugdict)
+    call WriteFile(a:plugdict.id.': '.join(sort(keys(s:F._frawor))))
+endfunction
+call s:F._frawor.newfeature('write1', {'cons': s:F.writefeature})
+call WriteFile('+++ '.s:g._frawor.id)
+if has_key(s:F._frawor, 'write1')
+    call s:F._frawor.write1()
+endif
+if has_key(s:F._frawor, 'write2')
+    call s:F._frawor.write2()
+endif
+call WriteFile('---')
+