Commits

ZyX_I committed 4b4b962

Added double-load test

Comments (0)

Files changed (4)

test/double-load.in

+:let &rtp.=",".escape($TESTDIR, ',\').'/rtp'
+:let g:testfile="plugin/double-load.2.vim"
+:source test.vim
+:call FraworUnload(g:testfile[:-5])
+:source test.vim

test/double-load.ok

+registered plugin/double-load.2
+features: 
+registered plugin/double-load
+features: 
+feature-load: plugin/double-load
+loaded plugin/double-load
+features: newfeature testfeature throw warn
+loaded plugin/double-load.2
+features: doublefeature newfeature throw warn
+registered plugin/double-load.2
+features: 
+loaded plugin/double-load.2
+features: doublefeature newfeature throw warn

test/rtp/plugin/double-load.2.vim

+if exists('s:g._pluginloaded') && s:g._pluginloaded
+    finish
+elseif !exists('s:g._pluginloaded')
+    execute frawor#Setup('0.0', {'plugin/double-load': '0.0'}, 0)
+    call WriteFile('registered '.s:g._frawor.id,
+                \  'features: '.join(sort(keys(s:F._frawor))))
+    finish
+endif
+call WriteFile('loaded '.s:g._frawor.id,
+            \  'features: '.join(sort(keys(s:F._frawor))))
+

test/rtp/plugin/double-load.vim

+if exists('s:g._pluginloaded') && s:g._pluginloaded
+    finish
+elseif !exists('s:g._pluginloaded')
+    execute frawor#Setup('0.0', {'plugin/plugin-with-feature': '0.0'}, 0)
+    call WriteFile('registered '.s:g._frawor.id,
+                \  'features: '.join(sort(keys(s:F._frawor))))
+    finish
+endif
+call s:F._frawor.newfeature('doublefeature', {'cons': function('deepcopy')})
+call WriteFile('loaded '.s:g._frawor.id,
+            \  'features: '.join(sort(keys(s:F._frawor))))
+