1. ZyX_I
  2. frawor

Commits

ZyX_I  committed 238d371

Renamed wrapfunc check to wrapfunc-checker,filter,+buffer, added missing ok

  • Participants
  • Parent commits 060f159
  • Branches default

Comments (0)

Files changed (5)

File test/rtp/plugin/wrapfunc-checker,filter,+buffer.vim

View file
+execute frawor#Setup('0.0', {'plugin/frawor/functions': '0.0'}, 1)
+function s:F.wrappedfunc()
+    call WriteFile('funcbefore:b'.bufnr('%'))
+    new
+    call WriteFile('funcafter:b'.bufnr('%'))
+endfunction
+function s:F.checker(args)
+    call WriteFile('checkerbefore:b'.bufnr('%'))
+    new
+    call WriteFile('checkerafter:b'.bufnr('%'))
+    return empty(a:args)
+endfunction
+function s:F.filter(args)
+    call WriteFile('filterbefore:b'.bufnr('%'))
+    new
+    call WriteFile('filterafter:b'.bufnr('%'))
+    return empty(a:args) ? a:args : 0
+endfunction
+call s:F._frawor.addextfunctions({'Function': {'function': s:F.wrappedfunc,
+            \                                   'checker': s:F.checker,
+            \                                    'filter': s:F.filter,
+            \                                 'altervars': [['+buffer']]}})
+call WriteFile('start:b'.bufnr('%'))
+call Function()
+call WriteFile('end:b'.bufnr('%'))
+call Function(0)

File test/rtp/plugin/wrapfunc.vim

-execute frawor#Setup('0.0', {'plugin/frawor/functions': '0.0'}, 1)
-function s:F.wrappedfunc()
-    call WriteFile('funcbefore:b'.bufnr('%'))
-    new
-    call WriteFile('funcafter:b'.bufnr('%'))
-endfunction
-function s:F.checker(args)
-    call WriteFile('checkerbefore:b'.bufnr('%'))
-    new
-    call WriteFile('checkerafter:b'.bufnr('%'))
-    return empty(a:args)
-endfunction
-function s:F.filter(args)
-    call WriteFile('filterbefore:b'.bufnr('%'))
-    new
-    call WriteFile('filterafter:b'.bufnr('%'))
-    return empty(a:args) ? a:args : 0
-endfunction
-call s:F._frawor.addextfunctions({'Function': {'function': s:F.wrappedfunc,
-            \                                   'checker': s:F.checker,
-            \                                    'filter': s:F.filter,
-            \                                 'altervars': [['+buffer']]}})
-call WriteFile('start:b'.bufnr('%'))
-call Function()
-call WriteFile('end:b'.bufnr('%'))
-call Function(0)

File test/wrapfunc-checker,filter,+buffer.in

View file
+:let &rtp.=",".escape($TESTDIR, ',\').'/rtp'
+:let g:testfile="plugin/".g:curtest.".vim"
+:source test.vim

File test/wrapfunc-checker,filter,+buffer.ok

View file
+start:b1
+checkerbefore:b1
+checkerafter:b2
+filterbefore:b2
+filterafter:b3
+funcbefore:b3
+funcafter:b4
+end:b1
+checkerbefore:b1
+checkerafter:b5
+Frawor:plugin/frawor/functions:checkfailed

File test/wrapfunc.in

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