From a8c926fc912decdb32fbd2b3c7bae05afb319bc7 Mon Sep 17 00:00:00 2001 From: Julian Mehne Date: Mon, 15 Dec 2014 18:47:16 +0100 Subject: [PATCH 1/2] Use a local viminfo file when running the old tests. This is required after defaulting to `nocp`, so that ~/.nviminfo files don't interfere with the old legacy tests. --- src/nvim/testdir/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 6bacef9778..fce0971d89 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -94,7 +94,7 @@ $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) test1.out RM_ON_RUN := test.out X* viminfo RM_ON_START := tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok -RUN_VIM := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in +RUN_VIM := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(VIMPROG) -u unix.vim -U NONE -i viminfo --noplugin -s dotest.in clean: -rm -rf *.out \ From 84dda11ec3317a8fb2d6ce6199b18e0ab5f74c44 Mon Sep 17 00:00:00 2001 From: Julian Mehne Date: Tue, 16 Dec 2014 20:39:06 +0100 Subject: [PATCH 2/2] Remove superfluous settings from legacy tests. --- src/nvim/testdir/test100.in | 2 +- src/nvim/testdir/test12.in | 1 - src/nvim/testdir/test15.in | 1 - src/nvim/testdir/test24.in | Bin 1301 -> 1265 bytes src/nvim/testdir/test29.in | 1 - src/nvim/testdir/test3.in | 2 +- src/nvim/testdir/test32.in | 2 +- src/nvim/testdir/test44.in | 2 +- src/nvim/testdir/test49.in | 2 +- src/nvim/testdir/test61.in | 1 - src/nvim/testdir/test70.in | 1 - src/nvim/testdir/test72.in | 2 +- src/nvim/testdir/test73.in | 1 - src/nvim/testdir/test74.in | 2 +- src/nvim/testdir/test78.in | 2 +- src/nvim/testdir/test8.in | 2 +- src/nvim/testdir/test85.in | 1 - src/nvim/testdir/test89.in | 2 +- src/nvim/testdir/test94.in | 1 - src/nvim/testdir/test95.in | 2 +- src/nvim/testdir/test99.in | 2 +- src/nvim/testdir/test_breakindent.in | 2 +- .../legacy/027_expand_file_names_spec.lua | 1 - .../legacy/043_magic_settings_spec.lua | 1 - 24 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/nvim/testdir/test100.in b/src/nvim/testdir/test100.in index 2bf931fd4f..083b4324b2 100644 --- a/src/nvim/testdir/test100.in +++ b/src/nvim/testdir/test100.in @@ -2,7 +2,7 @@ Tests for 'undolevel' setting being global-local STARTTEST :so small.vim -:set nocompatible viminfo+=nviminfo ul=5 +:set ul=5 :fu! FillBuffer() :for i in range(1,13) :put=i diff --git a/src/nvim/testdir/test12.in b/src/nvim/testdir/test12.in index 46e9c45b80..be3169a625 100644 --- a/src/nvim/testdir/test12.in +++ b/src/nvim/testdir/test12.in @@ -5,7 +5,6 @@ Tests for 'directory' option. STARTTEST :so small.vim -:set nocompatible viminfo+=nviminfo :set dir=.,~ :/start of testfile/,/end of testfile/w! Xtest1 :" do an ls of the current dir to find the swap file (should not be there) diff --git a/src/nvim/testdir/test15.in b/src/nvim/testdir/test15.in index 366529a550..60d8717278 100644 --- a/src/nvim/testdir/test15.in +++ b/src/nvim/testdir/test15.in @@ -12,7 +12,6 @@ STARTTEST :set fo+=tcroql tw=72 /xxxxxxxx$ 0gq6kk -:set nocp viminfo+=nviminfo :" undo/redo here to make the next undo only work on the following changes u :map gg :.,.+2s/^/x/kk:set tw=3gqq diff --git a/src/nvim/testdir/test24.in b/src/nvim/testdir/test24.in index 7dfc1afdc6999616e5171f76f4ff34d92f7d9a2a..292f4030483199a38ffdb3bfa6106649d5f8945f 100644 GIT binary patch delta 10 RcmbQr^^tQz$Hq08EC3m!1bhGh delta 46 wcmey!IhAWdhq6_1YKcN#esX?pL1IZ}QckKuS!Ql#URu7kZ61`hu|10g0H)*;1ONa4 diff --git a/src/nvim/testdir/test29.in b/src/nvim/testdir/test29.in index 83c6acdc1c..4cc2120814 100644 --- a/src/nvim/testdir/test29.in +++ b/src/nvim/testdir/test29.in @@ -5,7 +5,6 @@ Test for joining lines and marks in them STARTTEST :so small.vim -:set viminfo+=nviminfo :set nojoinspaces :set cpoptions-=j /firstline/ diff --git a/src/nvim/testdir/test3.in b/src/nvim/testdir/test3.in index a7543945c4..46e5767062 100644 --- a/src/nvim/testdir/test3.in +++ b/src/nvim/testdir/test3.in @@ -4,7 +4,7 @@ Test for 'cindent' STARTTEST :so small.vim -:set nocompatible viminfo+=nviminfo modeline +:set modeline :edit " read modeline /start of AUTO =/end of AUTO diff --git a/src/nvim/testdir/test32.in b/src/nvim/testdir/test32.in index 6b399fa6c6..02a41141ab 100644 --- a/src/nvim/testdir/test32.in +++ b/src/nvim/testdir/test32.in @@ -22,7 +22,7 @@ Test for insert expansion STARTTEST :so small.vim -:se nocp viminfo+=nviminfo cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff& +:se cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff& :se cot= nO#include "Xtestfile" ru diff --git a/src/nvim/testdir/test44.in b/src/nvim/testdir/test44.in index 87de1b95a4..65b08b08b8 100644 --- a/src/nvim/testdir/test44.in +++ b/src/nvim/testdir/test44.in @@ -4,7 +4,7 @@ See test99 for exactly the same test with re=2. STARTTEST :so mbyte.vim -:set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo +:set encoding=utf-8 termencoding=latin1 :set re=1 /^1 /a*b\{2}c\+/e diff --git a/src/nvim/testdir/test49.in b/src/nvim/testdir/test49.in index 5e1d6b461e..1ce57246ee 100644 --- a/src/nvim/testdir/test49.in +++ b/src/nvim/testdir/test49.in @@ -5,7 +5,7 @@ test49.failed, try to add one or more "G"s at the line ending in "test.out" STARTTEST :so small.vim -:se nocp nomore viminfo+=nviminfo +:se nomore :lang mess C :so test49.vim GGGGGGGGGGGGGG"rp:.-,$w! test.out diff --git a/src/nvim/testdir/test61.in b/src/nvim/testdir/test61.in index dc24ab9804..87bb07a209 100644 --- a/src/nvim/testdir/test61.in +++ b/src/nvim/testdir/test61.in @@ -85,7 +85,6 @@ ggO---:0put b ggO---:0put a ggO---:w >>test.out :so small.vim -:set nocp viminfo+=nviminfo :enew! oa :set ul=100 diff --git a/src/nvim/testdir/test70.in b/src/nvim/testdir/test70.in index 9fbe818b3d..24d2e4c446 100644 --- a/src/nvim/testdir/test70.in +++ b/src/nvim/testdir/test70.in @@ -2,7 +2,6 @@ Smoke test for MzScheme interface and mzeval() function STARTTEST :so mzscheme.vim -:set nocompatible viminfo+=nviminfo :function! MzRequire() :redir => l:mzversion :mz (version) diff --git a/src/nvim/testdir/test72.in b/src/nvim/testdir/test72.in index 4700d86981..20897f01a0 100644 --- a/src/nvim/testdir/test72.in +++ b/src/nvim/testdir/test72.in @@ -6,7 +6,7 @@ STARTTEST :so small.vim :" :" Test 'undofile': first a simple one-line change. -:set nocompatible viminfo+=nviminfo visualbell +:set visualbell :set ul=100 undofile nomore :set ft=unix :e! Xtestfile diff --git a/src/nvim/testdir/test73.in b/src/nvim/testdir/test73.in index 666e4d2e50..60cda2d970 100644 --- a/src/nvim/testdir/test73.in +++ b/src/nvim/testdir/test73.in @@ -7,7 +7,6 @@ STARTTEST :" :" This will cause a few errors, do it silently. :set visualbell -:set nocp viminfo+=nviminfo :" :function! DeleteDirectory(dir) : if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32") diff --git a/src/nvim/testdir/test74.in b/src/nvim/testdir/test74.in index 4fbe5e4d01..9fdbe771b3 100644 --- a/src/nvim/testdir/test74.in +++ b/src/nvim/testdir/test74.in @@ -7,7 +7,7 @@ STARTTEST :" :" This will cause a few errors, do it silently. :set visualbell -:set nocp viminfo+=!,nviminfo +:set viminfo+=! :let MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000} :" store a really long list, so line wrapping will occur in viminfo file :let MY_GLOBAL_LIST=range(1,100) diff --git a/src/nvim/testdir/test78.in b/src/nvim/testdir/test78.in index 1850bd9236..cb0e51edd5 100644 --- a/src/nvim/testdir/test78.in +++ b/src/nvim/testdir/test78.in @@ -6,7 +6,7 @@ blocks. STARTTEST :so small.vim -:set nocp fileformat=unix undolevels=-1 viminfo+=nviminfo +:set fileformat=unix undolevels=-1 :e! Xtest ggdG :let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789" diff --git a/src/nvim/testdir/test8.in b/src/nvim/testdir/test8.in index d9d00d97ae..0f27c813ec 100644 --- a/src/nvim/testdir/test8.in +++ b/src/nvim/testdir/test8.in @@ -32,7 +32,7 @@ endfunc $put ='VimLeave done' write endfunc -:set viminfo='100,nviminfo +:set viminfo='100 :au BufUnload * call CloseAll() :au VimLeave * call WriteToOut() :e small.vim diff --git a/src/nvim/testdir/test85.in b/src/nvim/testdir/test85.in index c5ca873a49..f7112792e9 100644 --- a/src/nvim/testdir/test85.in +++ b/src/nvim/testdir/test85.in @@ -3,7 +3,6 @@ Test for Lua interface and luaeval() function STARTTEST :so small.vim :so lua.vim -:set nocompatible viminfo+=nviminfo :lua l = vim.list():add"item0":add"dictionary with list OK":add"item2" :lua h = vim.dict(); h.list = l :call garbagecollect() diff --git a/src/nvim/testdir/test89.in b/src/nvim/testdir/test89.in index 1968066198..f1f64fb41f 100644 --- a/src/nvim/testdir/test89.in +++ b/src/nvim/testdir/test89.in @@ -5,7 +5,7 @@ STARTTEST :so small.vim -:set hidden nocp nu rnu viminfo+=nviminfo +:set hidden nu rnu :redir @a | set nu? rnu? | redir END :e! xx :redir @b | set nu? rnu? | redir END diff --git a/src/nvim/testdir/test94.in b/src/nvim/testdir/test94.in index dfa91d8340..a8b46112d2 100644 --- a/src/nvim/testdir/test94.in +++ b/src/nvim/testdir/test94.in @@ -17,7 +17,6 @@ Test cases: STARTTEST :so small.vim -:set nocp viminfo+=nviminfo : :" User functions :function MoveToCap() diff --git a/src/nvim/testdir/test95.in b/src/nvim/testdir/test95.in index b2b9de772e..221b550487 100644 --- a/src/nvim/testdir/test95.in +++ b/src/nvim/testdir/test95.in @@ -7,7 +7,7 @@ actually tried. STARTTEST :so small.vim :so mbyte.vim -:set nocp encoding=utf-8 viminfo+=nviminfo nomore +:set encoding=utf-8 nomore :" tl is a List of Lists with: :" 2: test auto/old/new 0: test auto/old 1: test auto/new :" regexp pattern diff --git a/src/nvim/testdir/test99.in b/src/nvim/testdir/test99.in index 77828f4b68..32bc68cce4 100644 --- a/src/nvim/testdir/test99.in +++ b/src/nvim/testdir/test99.in @@ -4,7 +4,7 @@ See test44 for exactly the same test with re=1. STARTTEST :so mbyte.vim -:set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo +:set encoding=utf-8 termencoding=latin1 :set re=2 /^1 /a*b\{2}c\+/e diff --git a/src/nvim/testdir/test_breakindent.in b/src/nvim/testdir/test_breakindent.in index 0b00c95a85..ad12d0074d 100644 --- a/src/nvim/testdir/test_breakindent.in +++ b/src/nvim/testdir/test_breakindent.in @@ -81,7 +81,7 @@ STARTTEST :" https://groups.google.com/d/msg/vim_dev/ZOdg2mc9c9Y/TT8EhFjEy0IJ :only :vert 20new -:set all& nocp breakindent briopt=min:10 +:set all& breakindent briopt=min:10 :call setline(1, [" a\tb\tc\td\te", " z y x w v"]) :/^\s*a fbgjyl:let line1 = @0 diff --git a/test/functional/legacy/027_expand_file_names_spec.lua b/test/functional/legacy/027_expand_file_names_spec.lua index bff61c1516..d31f29d38a 100644 --- a/test/functional/legacy/027_expand_file_names_spec.lua +++ b/test/functional/legacy/027_expand_file_names_spec.lua @@ -10,7 +10,6 @@ describe('expand file name', function() setup(clear) it('is working', function() - execute('set nocp') execute('!mkdir Xdir1') execute('!mkdir Xdir2') execute('!mkdir Xdir3') diff --git a/test/functional/legacy/043_magic_settings_spec.lua b/test/functional/legacy/043_magic_settings_spec.lua index ccef298cdd..27694e3754 100644 --- a/test/functional/legacy/043_magic_settings_spec.lua +++ b/test/functional/legacy/043_magic_settings_spec.lua @@ -21,7 +21,6 @@ describe('regexp with magic settings', function() 9 foobar ]]) - execute('set nocompatible viminfo+=nviminfo') execute('/^1') execute([[/a*b\{2}c\+/e]]) feed([[x/\Md\*e\{2}f\+/e]])