comparison src/testdir/test_vimscript.vim @ 12523:881564b89f9b v8.0.1140

patch 8.0.1140: still old style tests commit https://github.com/vim/vim/commit/bb3e6416f157f68799ccb6070fa2f91df6780e79 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 23 19:24:46 2017 +0200 patch 8.0.1140: still old style tests Problem: Still old style tests. Solution: Convert two tests to new style. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Sat, 23 Sep 2017 19:30:04 +0200
parents 7003f241b6c7
children 33a2277b8d4d
comparison
equal deleted inserted replaced
12522:c9f1b01ee83d 12523:881564b89f9b
1419 call assert_equal(1, nieuw) 1419 call assert_equal(1, nieuw)
1420 unlet nieuw 1420 unlet nieuw
1421 delcommand Nieuw 1421 delcommand Nieuw
1422 endfunc 1422 endfunc
1423 1423
1424 " Test for script-local function
1425 func <SID>DoLast()
1426 call append(line('$'), "last line")
1427 endfunc
1428
1429 func s:DoNothing()
1430 call append(line('$'), "nothing line")
1431 endfunc
1432
1433 func Test_script_local_func()
1434 set nocp viminfo+=nviminfo
1435 new
1436 nnoremap <buffer> _x :call <SID>DoNothing()<bar>call <SID>DoLast()<bar>delfunc <SID>DoNothing<bar>delfunc <SID>DoLast<cr>
1437
1438 normal _x
1439 call assert_equal('nothing line', getline(2))
1440 call assert_equal('last line', getline(3))
1441 enew! | close
1442 endfunc
1443
1424 "------------------------------------------------------------------------------- 1444 "-------------------------------------------------------------------------------
1425 " Modelines {{{1 1445 " Modelines {{{1
1426 " vim: ts=8 sw=4 tw=80 fdm=marker 1446 " vim: ts=8 sw=4 tw=80 fdm=marker
1427 " vim: fdt=substitute(substitute(foldtext(),\ '\\%(^+--\\)\\@<=\\(\\s*\\)\\(.\\{-}\\)\:\ \\%(\"\ \\)\\=\\(Test\ \\d*\\)\:\\s*',\ '\\3\ (\\2)\:\ \\1',\ \"\"),\ '\\(Test\\s*\\)\\(\\d\\)\\D\\@=',\ '\\1\ \\2',\ "") 1447 " vim: fdt=substitute(substitute(foldtext(),\ '\\%(^+--\\)\\@<=\\(\\s*\\)\\(.\\{-}\\)\:\ \\%(\"\ \\)\\=\\(Test\ \\d*\\)\:\\s*',\ '\\3\ (\\2)\:\ \\1',\ \"\"),\ '\\(Test\\s*\\)\\(\\d\\)\\D\\@=',\ '\\1\ \\2',\ "")
1428 "------------------------------------------------------------------------------- 1448 "-------------------------------------------------------------------------------