mirror of
https://github.com/neovim/neovim.git
synced 2026-04-25 08:44:06 +00:00
legacy tests: migrate test_options
This commit is contained in:
committed by
Thiago de Arruda
parent
b33c92439b
commit
5b7d9bbd08
@@ -1,17 +0,0 @@
|
||||
Test for ":options".
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:let caught = 'ok'
|
||||
:try
|
||||
:options
|
||||
:catch
|
||||
:let caught = v:throwpoint . "\n" . v:exception
|
||||
:endtry
|
||||
:buf 1
|
||||
:$put =caught
|
||||
:/^result/,$w! test.out
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
||||
result
|
||||
@@ -1,2 +0,0 @@
|
||||
result
|
||||
ok
|
||||
20
test/functional/legacy/options_spec.lua
Normal file
20
test/functional/legacy/options_spec.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
-- Test for ":options".
|
||||
|
||||
local helpers = require('test.functional.helpers')
|
||||
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
|
||||
local execute, expect = helpers.execute, helpers.expect
|
||||
|
||||
describe('options', function()
|
||||
setup(clear)
|
||||
|
||||
it('is working', function()
|
||||
insert('result')
|
||||
|
||||
execute("let caught = 'ok'")
|
||||
execute('try', 'options', 'catch', 'let caught = v:throwpoint . "\n" . v:exception', 'endtry')
|
||||
execute('buf 1')
|
||||
execute('$put =caught')
|
||||
|
||||
expect("result\nok")
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user