From 5b7d9bbd089563154e0bfbc7af31c89929cf3969 Mon Sep 17 00:00:00 2001 From: Rainer Borene Date: Wed, 22 Oct 2014 20:34:54 -0200 Subject: legacy tests: migrate test_options --- src/nvim/testdir/test_options.in | 17 ----------------- src/nvim/testdir/test_options.ok | 2 -- test/functional/legacy/options_spec.lua | 20 ++++++++++++++++++++ 3 files changed, 20 insertions(+), 19 deletions(-) delete mode 100644 src/nvim/testdir/test_options.in delete mode 100644 src/nvim/testdir/test_options.ok create mode 100644 test/functional/legacy/options_spec.lua diff --git a/src/nvim/testdir/test_options.in b/src/nvim/testdir/test_options.in deleted file mode 100644 index bf1232a223..0000000000 --- a/src/nvim/testdir/test_options.in +++ /dev/null @@ -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 diff --git a/src/nvim/testdir/test_options.ok b/src/nvim/testdir/test_options.ok deleted file mode 100644 index a2e1494a1f..0000000000 --- a/src/nvim/testdir/test_options.ok +++ /dev/null @@ -1,2 +0,0 @@ -result -ok diff --git a/test/functional/legacy/options_spec.lua b/test/functional/legacy/options_spec.lua new file mode 100644 index 0000000000..fcc39434ff --- /dev/null +++ b/test/functional/legacy/options_spec.lua @@ -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) -- cgit