Commits

ZyX_I  committed 10ad1a2

tests: Extended require-feature tests

  • Participants
  • Parent commits 1499942

Comments (0)

Files changed (5)

File test/require-feature.ok

 Registered plugin/twoload-plugin-with-feature-3
 Loaded plugin/twoload-plugin-with-feature-3
 Has run FraworLoad
+Registered plugin/twoload-plugin-with-feature-after-registration-2
+Has run :runtime 2
+Registered plugin/twoload-plugin-with-feature-after-registration-3
+Loaded plugin/twoload-plugin-with-feature-after-registration-3
+Has run FraworLoad 2
 Registered plugin/twoload-plugin-with-feature-1
 Loaded plugin/twoload-plugin-with-feature-1
 feature-register: plugin/twoload-plugin-with-feature-1
 feature-depadd: plugin/twoload-plugin-with-feature-2 plugin/twoload-plugin-with-feature-3
 feature-depadd: plugin/twoload-plugin-with-feature-3 plugin/twoload-plugin-with-feature-3
 require tpwf3: 1
+Registered plugin/twoload-plugin-with-feature-after-registration-1
+feature-register: plugin/twoload-plugin-with-feature-after-registration-1
+feature-load: plugin/twoload-plugin-with-feature-after-registration-1
+Loaded plugin/twoload-plugin-with-feature-after-registration-1
+feature-depadd: plugin/twoload-plugin-with-feature-1 plugin/twoload-plugin-with-feature-after-registration-1
+feature-depadd: plugin/twoload-plugin-with-feature-2 plugin/twoload-plugin-with-feature-after-registration-1
+feature-depadd: plugin/twoload-plugin-with-feature-3 plugin/twoload-plugin-with-feature-after-registration-1
+feature-depadd: plugin/twoload-plugin-with-feature-after-registration-1 plugin/twoload-plugin-with-feature-after-registration-1
+require tpwfar1: 1
+Loaded plugin/twoload-plugin-with-feature-after-registration-2
+feature-register: plugin/twoload-plugin-with-feature-after-registration-2
+feature-load: plugin/twoload-plugin-with-feature-after-registration-2
+feature-depadd: plugin/twoload-plugin-with-feature-1 plugin/twoload-plugin-with-feature-after-registration-2
+feature-depadd: plugin/twoload-plugin-with-feature-2 plugin/twoload-plugin-with-feature-after-registration-2
+feature-depadd: plugin/twoload-plugin-with-feature-3 plugin/twoload-plugin-with-feature-after-registration-2
+feature-depadd: plugin/twoload-plugin-with-feature-after-registration-1 plugin/twoload-plugin-with-feature-after-registration-2
+feature-depadd: plugin/twoload-plugin-with-feature-after-registration-2 plugin/twoload-plugin-with-feature-after-registration-2
+require tpwfar2: 1
+feature-register: plugin/twoload-plugin-with-feature-after-registration-3
+feature-load: plugin/twoload-plugin-with-feature-after-registration-3
+feature-depadd: plugin/twoload-plugin-with-feature-1 plugin/twoload-plugin-with-feature-after-registration-3
+feature-depadd: plugin/twoload-plugin-with-feature-2 plugin/twoload-plugin-with-feature-after-registration-3
+feature-depadd: plugin/twoload-plugin-with-feature-3 plugin/twoload-plugin-with-feature-after-registration-3
+feature-depadd: plugin/twoload-plugin-with-feature-after-registration-1 plugin/twoload-plugin-with-feature-after-registration-3
+feature-depadd: plugin/twoload-plugin-with-feature-after-registration-2 plugin/twoload-plugin-with-feature-after-registration-3
+feature-depadd: plugin/twoload-plugin-with-feature-after-registration-3 plugin/twoload-plugin-with-feature-after-registration-3
+require tpwfar3: 1
 feature-load: plugin/require-feature
 feature-depadd: plugin/twoload-plugin-with-feature-1 plugin/plugin-with-feature
 feature-depadd: plugin/twoload-plugin-with-feature-2 plugin/plugin-with-feature
 feature-depadd: plugin/twoload-plugin-with-feature-3 plugin/plugin-with-feature
+feature-depadd: plugin/twoload-plugin-with-feature-after-registration-1 plugin/plugin-with-feature
+feature-depadd: plugin/twoload-plugin-with-feature-after-registration-2 plugin/plugin-with-feature
+feature-depadd: plugin/twoload-plugin-with-feature-after-registration-3 plugin/plugin-with-feature
 require pwf: 1
 newfeature
 require

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

     call WriteFile('Has run :runtime')
     call FraworLoad('@twoload-plugin-with-feature-3')
     call WriteFile('Has run FraworLoad')
+    runtime plugin/twoload-plugin-with-feature-after-registration-2.vim
+    call WriteFile('Has run :runtime 2')
+    call FraworLoad('@twoload-plugin-with-feature-after-registration-3')
+    call WriteFile('Has run FraworLoad 2')
     call WriteFile('require tpwf1: '.s:_f.require('@twoload-plugin-with-feature-1', [0, 0], 0))
     call WriteFile('require tpwf2: '.s:_f.require('@twoload-plugin-with-feature-2', [0, 0], 0))
     call WriteFile('require tpwf3: '.s:_f.require('@twoload-plugin-with-feature-3', [0, 0], 0))
+    call WriteFile('require tpwfar1: '.s:_f.require('@twoload-plugin-with-feature-after-registration-1', [0, 0], 0))
+    call WriteFile('require tpwfar2: '.s:_f.require('@twoload-plugin-with-feature-after-registration-2', [0, 0], 0))
+    call WriteFile('require tpwfar3: '.s:_f.require('@twoload-plugin-with-feature-after-registration-3', [0, 0], 0))
     call WriteFile('require pwf: '.s:_f.require('@plugin-with-feature',             [0, 0], 0))
     call WriteFile(sort(keys(s:_f)))
     call WriteFile('require xup: '.s:_f.require('@xxx-unexistent-plugin',           [0, 0], 0))

File test/rtp/plugin/twoload-plugin-with-feature-after-registration-1.vim

+if !exists('s:_pluginloaded')
+    execute frawor#Setup('0.0', {}, 0)
+    call WriteFile('Registered '.s:_frawor.id)
+    let s:testfeature={}
+    function s:testfeature.depadd(plugdict, fdict, dplid)
+        call WriteFile('feature-depadd: '.s:_frawor.id.' '.a:dplid)
+    endfunction
+    function s:testfeature.load(plugdict, fdict)
+        call WriteFile('feature-load: '.s:_frawor.id)
+    endfunction
+    function s:testfeature.register(plugdict, fdict)
+        call WriteFile('feature-register: '.s:_frawor.id)
+    endfunction
+    function s:testfeature.unload(plugdict, fdict)
+        call WriteFile('feature-unload: '.s:_frawor.id)
+    endfunction
+    function s:testfeature.unloadpre(plugdict, fdict)
+        call WriteFile('feature-unloadpre: '.s:_frawor.id)
+    endfunction
+    call s:_f.newfeature('testfeaturea'.s:_frawor.id[-1:], s:testfeature)
+    finish
+elseif s:_pluginloaded
+    finish
+endif
+call WriteFile('Loaded '.s:_frawor.id)

File test/rtp/plugin/twoload-plugin-with-feature-after-registration-2.vim

+if !exists('s:_pluginloaded')
+    execute frawor#Setup('0.0', {}, 0)
+    call WriteFile('Registered '.s:_frawor.id)
+    let s:testfeature={}
+    function s:testfeature.depadd(plugdict, fdict, dplid)
+        call WriteFile('feature-depadd: '.s:_frawor.id.' '.a:dplid)
+    endfunction
+    function s:testfeature.load(plugdict, fdict)
+        call WriteFile('feature-load: '.s:_frawor.id)
+    endfunction
+    function s:testfeature.register(plugdict, fdict)
+        call WriteFile('feature-register: '.s:_frawor.id)
+    endfunction
+    function s:testfeature.unload(plugdict, fdict)
+        call WriteFile('feature-unload: '.s:_frawor.id)
+    endfunction
+    function s:testfeature.unloadpre(plugdict, fdict)
+        call WriteFile('feature-unloadpre: '.s:_frawor.id)
+    endfunction
+    call s:_f.newfeature('testfeaturea'.s:_frawor.id[-1:], s:testfeature)
+    finish
+elseif s:_pluginloaded
+    finish
+endif
+call WriteFile('Loaded '.s:_frawor.id)

File test/rtp/plugin/twoload-plugin-with-feature-after-registration-3.vim

+if !exists('s:_pluginloaded')
+    execute frawor#Setup('0.0', {}, 0)
+    call WriteFile('Registered '.s:_frawor.id)
+    let s:testfeature={}
+    function s:testfeature.depadd(plugdict, fdict, dplid)
+        call WriteFile('feature-depadd: '.s:_frawor.id.' '.a:dplid)
+    endfunction
+    function s:testfeature.load(plugdict, fdict)
+        call WriteFile('feature-load: '.s:_frawor.id)
+    endfunction
+    function s:testfeature.register(plugdict, fdict)
+        call WriteFile('feature-register: '.s:_frawor.id)
+    endfunction
+    function s:testfeature.unload(plugdict, fdict)
+        call WriteFile('feature-unload: '.s:_frawor.id)
+    endfunction
+    function s:testfeature.unloadpre(plugdict, fdict)
+        call WriteFile('feature-unloadpre: '.s:_frawor.id)
+    endfunction
+    call s:_f.newfeature('testfeaturea'.s:_frawor.id[-1:], s:testfeature)
+    finish
+elseif s:_pluginloaded
+    finish
+endif
+call WriteFile('Loaded '.s:_frawor.id)