diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-08-01 23:16:17 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-08-01 23:16:53 -0400 |
commit | dd7c7efcfb37342ccd9168977b2431d16de7b3cb (patch) | |
tree | 22fb3ae8dd192f9dc50053b02d33e76af73a6af1 /test | |
parent | d4396acedb213209aee4693e196f1952bbc88ff5 (diff) | |
parent | ea551044ea8a0de8e2f6937c9d083cecd2f67b99 (diff) | |
download | rneovim-dd7c7efcfb37342ccd9168977b2431d16de7b3cb.tar.gz rneovim-dd7c7efcfb37342ccd9168977b2431d16de7b3cb.tar.bz2 rneovim-dd7c7efcfb37342ccd9168977b2431d16de7b3cb.zip |
Merge #3099 glob() should return '.' and '..'
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/eval/glob_spec.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/functional/eval/glob_spec.lua b/test/functional/eval/glob_spec.lua new file mode 100644 index 0000000000..977b82d733 --- /dev/null +++ b/test/functional/eval/glob_spec.lua @@ -0,0 +1,21 @@ +local helpers = require('test.functional.helpers') +local clear, execute, eval, eq = helpers.clear, helpers.execute, helpers.eval, helpers.eq + +before_each(function() + clear() + lfs.mkdir('test-glob') + execute('cd test-glob') +end) + +after_each(function() + lfs.rmdir('test-glob') +end) + +describe('glob()', function() + it("glob('.*') returns . and .. ", function() + eq({'.', '..'}, eval("glob('.*', 0, 1)")) + end) + it("glob('*') returns an empty list ", function() + eq({}, eval("glob('*', 0, 1)")) + end) +end) |