diff options
author | Tommy Allen <tommy@esdf.io> | 2017-01-24 22:59:07 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-01-31 00:48:30 +0100 |
commit | bdfa1479d296bbc734abc60be1544eb72d315325 (patch) | |
tree | 808f4a8685ac317a2923e2ef8fb3aff905fa7424 /test/functional/terminal/ex_terminal_spec.lua | |
parent | 81525dc5c35c350c1e7e29c625368263cc8b3e33 (diff) | |
download | rneovim-bdfa1479d296bbc734abc60be1544eb72d315325.tar.gz rneovim-bdfa1479d296bbc734abc60be1544eb72d315325.tar.bz2 rneovim-bdfa1479d296bbc734abc60be1544eb72d315325.zip |
eval.c: Fix findfile(), :find, gf in :terminal. #6009
Closes #4299
Diffstat (limited to 'test/functional/terminal/ex_terminal_spec.lua')
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index 4247be0417..7c391db18c 100644 --- a/test/functional/terminal/ex_terminal_spec.lua +++ b/test/functional/terminal/ex_terminal_spec.lua @@ -112,4 +112,40 @@ describe(':terminal (with fake shell)', function() eq(2, eval("1+1")) -- Still alive? end) + it('works with findfile()', function() + execute('terminal') + eq('term://', string.match(eval('bufname("%")'), "^term://")) + eq('scripts/shadacat.py', eval('findfile("scripts/shadacat.py", ".")')) + end) + + it('works with :find', function() + terminal_with_fake_shell() + wait() + screen:expect([[ + ready $ | + [Process exited 0] | + | + -- TERMINAL -- | + ]]) + eq('term://', string.match(eval('bufname("%")'), "^term://")) + helpers.feed([[<C-\><C-N>]]) + execute([[find */shadacat.py]]) + eq('scripts/shadacat.py', eval('bufname("%")')) + end) + + it('works with gf', function() + terminal_with_fake_shell([[echo "scripts/shadacat.py"]]) + wait() + screen:expect([[ + ready $ echo "scripts/shadacat.py" | + | + [Process exited 0] | + -- TERMINAL -- | + ]]) + helpers.feed([[<C-\><C-N>]]) + eq('term://', string.match(eval('bufname("%")'), "^term://")) + helpers.feed([[ggf"lgf]]) + eq('scripts/shadacat.py', eval('bufname("%")')) + end) + end) |