diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-01-13 08:25:11 -0500 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-01-28 13:58:54 -0500 |
commit | 5a39d2d00e398b404b4db7ec45b2f490d5bb845e (patch) | |
tree | 46c5eeaa3d1459a09988da54be8cc7903ff514a0 | |
parent | 984a93df96f91af8343d62c145aee802cc1638f4 (diff) | |
download | rneovim-5a39d2d00e398b404b4db7ec45b2f490d5bb845e.tar.gz rneovim-5a39d2d00e398b404b4db7ec45b2f490d5bb845e.tar.bz2 rneovim-5a39d2d00e398b404b4db7ec45b2f490d5bb845e.zip |
test: fnamemodify with :8 filename modifier
-rw-r--r-- | test/functional/eval/fnamemodify_spec.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/eval/fnamemodify_spec.lua b/test/functional/eval/fnamemodify_spec.lua index 2225c5da7c..52dfe1a55f 100644 --- a/test/functional/eval/fnamemodify_spec.lua +++ b/test/functional/eval/fnamemodify_spec.lua @@ -4,10 +4,19 @@ local eq = helpers.eq local iswin = helpers.iswin local fnamemodify = helpers.funcs.fnamemodify local command = helpers.command +local write_file = helpers.write_file describe('fnamemodify()', function() + setup(function() + write_file('Xtest-fnamemodify.txt', [[foobar]]) + end) + before_each(clear) + teardown(function() + os.remove('Xtest-fnamemodify.txt') + end) + it('works', function() if iswin() then local drive_f = io.popen('for %P in (%CD%) do @echo %~dP', 'r') @@ -29,4 +38,8 @@ describe('fnamemodify()', function() eq('/', fnamemodify([[/]], ':p')) end end) + + it(':8 works', function() + eq('Xtest-fnamemodify.txt', fnamemodify([[Xtest-fnamemodify.txt]], ':8')) + end) end) |