diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-03-19 01:36:24 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-03-19 01:37:48 +0100 |
commit | 5beb3b8ee5d5639af4e69f2347ec0ca7fdb69f5a (patch) | |
tree | db78815fc3e607e293a2d7b4627cb0c05740ce69 /test/functional/example_spec.lua | |
parent | a077f53914ac0e8eadbe2de1ccb088ed174ef818 (diff) | |
download | rneovim-5beb3b8ee5d5639af4e69f2347ec0ca7fdb69f5a.tar.gz rneovim-5beb3b8ee5d5639af4e69f2347ec0ca7fdb69f5a.tar.bz2 rneovim-5beb3b8ee5d5639af4e69f2347ec0ca7fdb69f5a.zip |
test: example_spec.lua
Diffstat (limited to 'test/functional/example_spec.lua')
-rw-r--r-- | test/functional/example_spec.lua | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/functional/example_spec.lua b/test/functional/example_spec.lua new file mode 100644 index 0000000000..bb22633c1b --- /dev/null +++ b/test/functional/example_spec.lua @@ -0,0 +1,36 @@ +-- To run this test: +-- TEST_FILE=test/functional/example_spec.lua make functionaltest + +local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') +local clear, feed = helpers.clear, helpers.feed + +describe('example', function() + local screen + before_each(function() + clear() + screen = Screen.new(20,5) + screen:attach() + screen:set_default_attr_ids( { + [0] = {bold=true, foreground=Screen.colors.Blue}, + [1] = {bold=true, foreground=Screen.colors.Brown} + } ) + end) + + it("works with buffer switch and 'hidden'", function() + -- Do some stuff. + feed('iline1<cr>line2<esc>') + + -- For debugging only: prints the current screen. + -- screen:snapshot_util() + + -- Assert the expected state. + screen:expect([[ + line1 | + line^2 | + {0:~ }| + {0:~ }| + | + ]]) + end) +end) |