diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-11-03 11:24:27 -0500 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-11-03 11:24:27 -0500 |
commit | 87a11d65ee576d965bcf432e878f191512e46bdd (patch) | |
tree | 193ffc07d4bf4e0423e9e45ef8110639568ef9eb /test | |
parent | 85b8810660ffa37eb2d3edf85a4dbf12ba5f1ca3 (diff) |
Fixed `lfs.walk()` bug with root directory.
Prevent dir to walk from becoming an empty string.
Diffstat (limited to 'test')
-rw-r--r-- | test/test.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test.lua b/test/test.lua index 53a7cb24..8a768731 100644 --- a/test/test.lua +++ b/test/test.lua @@ -759,6 +759,11 @@ function test_lfs_ext_walk_symlinks() os.execute('rm -r ' .. dir) end +function test_lfs_ext_walk_root() + local filename = lfs.walk('/', nil, 0, true)() + assert(not filename:find('lfs_ext.lua:'), 'coroutine error') +end + function test_lfs_ext_abs_path() assert_equal(lfs.abspath('bar', '/foo'), '/foo/bar') assert_equal(lfs.abspath('./bar', '/foo'), '/foo/bar') |