diff options
Diffstat (limited to 'test/functional/legacy')
-rw-r--r-- | test/functional/legacy/007_ball_buffer_list_spec.lua | 5 | ||||
-rw-r--r-- | test/functional/legacy/008_autocommands_spec.lua | 3 | ||||
-rw-r--r-- | test/functional/legacy/011_autocommands_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/legacy/012_directory_spec.lua | 1 | ||||
-rw-r--r-- | test/functional/legacy/arglist_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/legacy/cdo_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/legacy/fixeol_spec.lua | 4 |
7 files changed, 15 insertions, 8 deletions
diff --git a/test/functional/legacy/007_ball_buffer_list_spec.lua b/test/functional/legacy/007_ball_buffer_list_spec.lua index a180e73301..d4e4547c43 100644 --- a/test/functional/legacy/007_ball_buffer_list_spec.lua +++ b/test/functional/legacy/007_ball_buffer_list_spec.lua @@ -8,6 +8,9 @@ describe(':ball', function() setup(clear) it('is working', function() + -- Must disable 'hidden' so that the BufReadPost autocmd is triggered + -- when Xxx2 is reloaded + feed_command('set nohidden') insert([[ start of test file Xxx this is a test @@ -18,7 +21,7 @@ describe(':ball', function() feed('gg') -- Write test file Xxx1 - feed('A1:.,/end of/w! Xxx1<cr>') + feed('A1<esc>:.,/end of/w! Xxx1<cr>') feed_command('sp Xxx1') feed_command('close') diff --git a/test/functional/legacy/008_autocommands_spec.lua b/test/functional/legacy/008_autocommands_spec.lua index 939404cb5e..002f037d09 100644 --- a/test/functional/legacy/008_autocommands_spec.lua +++ b/test/functional/legacy/008_autocommands_spec.lua @@ -71,6 +71,9 @@ describe('autocommands that delete and unload buffers:', function() au BufUnload * call CloseAll() au VimLeave * call WriteToOut() ]]) + -- Must disable 'hidden' so that the BufUnload autocmd is triggered between + -- each :edit + command('set nohidden') command('silent! edit Xxx2') command('silent! edit Xxx1') command('silent! edit Makefile') -- an existing file diff --git a/test/functional/legacy/011_autocommands_spec.lua b/test/functional/legacy/011_autocommands_spec.lua index 7b6f2f63e9..0fa9290f3c 100644 --- a/test/functional/legacy/011_autocommands_spec.lua +++ b/test/functional/legacy/011_autocommands_spec.lua @@ -129,13 +129,11 @@ describe('file reading, writing and bufnew and filter autocommands', function() -- Will load Xtest.c. feed_command('e! foo.c') feed_command("au FileAppendPre *.out '[,']s/new/NEW/") - feed_command('au FileAppendPost *.out !cat Xtest.c >>test.out') + feed_command('au FileAppendPost *.out !cat Xtest.c >test.out') -- Append it to the output file. feed_command('w>>test.out') -- Discard all prompts and messages. feed('<C-L>') - -- Expect the decompressed file in the buffer. - feed_command('e test.out') expect([[ /* diff --git a/test/functional/legacy/012_directory_spec.lua b/test/functional/legacy/012_directory_spec.lua index 48dd24db9e..f666e51469 100644 --- a/test/functional/legacy/012_directory_spec.lua +++ b/test/functional/legacy/012_directory_spec.lua @@ -80,6 +80,7 @@ describe("'directory' option", function() eq({ "Xtest1.swp", "Xtest3" }, ls_dir_sorted("Xtest2")) meths.set_option('directory', 'Xtest.je') + command('bdelete') command('edit Xtest2/Xtest3') eq(true, curbufmeths.get_option('swapfile')) poke_eventloop() diff --git a/test/functional/legacy/arglist_spec.lua b/test/functional/legacy/arglist_spec.lua index 67c5750033..6a2e86ccb4 100644 --- a/test/functional/legacy/arglist_spec.lua +++ b/test/functional/legacy/arglist_spec.lua @@ -156,10 +156,12 @@ describe('argument list commands', function() eq({'a', 'b', 'a', 'c'}, eval('argv()')) command('0argedit x') eq({'x', 'a', 'b', 'a', 'c'}, eval('argv()')) + command('set nohidden') command('enew! | set modified') assert_fails('argedit y', 'E37:') command('argedit! y') eq({'x', 'y', 'y', 'a', 'b', 'a', 'c'}, eval('argv()')) + command('set hidden') command('%argd') command('argedit a b') eq({'a', 'b'}, eval('argv()')) diff --git a/test/functional/legacy/cdo_spec.lua b/test/functional/legacy/cdo_spec.lua index 5e46431cc1..8b3216cbfd 100644 --- a/test/functional/legacy/cdo_spec.lua +++ b/test/functional/legacy/cdo_spec.lua @@ -91,7 +91,8 @@ describe('cdo', function() exe "silent! 4,5" . XdoCmd call assert_equal([], l) - " Run commands from an unsaved buffer + " Run commands from an unsaved buffer when 'hidden' is unset + set nohidden let v:errmsg='' let l = [] enew @@ -108,6 +109,7 @@ describe('cdo', function() if subst_count != 1 || getline('.') != 'xLine1' call add(v:errors, 'Abort command on error test failed') endif + set hidden let l = [] exe "2,2" . Xdo . "! call add(l, GetRuler())" diff --git a/test/functional/legacy/fixeol_spec.lua b/test/functional/legacy/fixeol_spec.lua index 50236e8617..d3ff86d349 100644 --- a/test/functional/legacy/fixeol_spec.lua +++ b/test/functional/legacy/fixeol_spec.lua @@ -23,8 +23,6 @@ describe('fixeol', function() it('is working', function() -- First write two test files – with and without trailing EOL. - -- Use Unix fileformat for consistency. - feed_command('set ff=unix') feed_command('enew!') feed('awith eol<esc>:w! XXEol<cr>') feed_command('enew!') @@ -40,7 +38,7 @@ describe('fixeol', function() feed_command('e! XXNoEol') feed('ostays without<esc>:set nofixeol<cr>') feed_command('w! XXTestNoEol') - feed_command('bwipe XXEol XXNoEol XXTestEol XXTestNoEol') + feed_command('bwipe! XXEol XXNoEol XXTestEol XXTestNoEol') feed_command('set fixeol') -- Append "END" to each file so that we can see what the last written char was. |