diff options
author | altermo <unknown> | 2024-01-18 10:02:35 +0100 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-01-19 11:54:04 +0000 |
commit | 9707363b09dbadeb58966d6d45acca17bd74e527 (patch) | |
tree | 57d382cf4e300261124eada5d2a0a40b445fdb95 /test/functional/lua/glob_spec.lua | |
parent | 0b36cbbafd99e60844faafea026a89a3355a4ac4 (diff) | |
download | rneovim-9707363b09dbadeb58966d6d45acca17bd74e527.tar.gz rneovim-9707363b09dbadeb58966d6d45acca17bd74e527.tar.bz2 rneovim-9707363b09dbadeb58966d6d45acca17bd74e527.zip |
refactor(lua): refactored glob
Diffstat (limited to 'test/functional/lua/glob_spec.lua')
-rw-r--r-- | test/functional/lua/glob_spec.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/functional/lua/glob_spec.lua b/test/functional/lua/glob_spec.lua index c7ef498008..1eac037575 100644 --- a/test/functional/lua/glob_spec.lua +++ b/test/functional/lua/glob_spec.lua @@ -67,18 +67,16 @@ describe('glob', function() eq(true, match('dir/*/file.txt', 'dir/subdir/file.txt')) eq(false, match('dir/*/file.txt', 'dir/subdir/subdir/file.txt')) - -- TODO: The spec does not describe this, but VSCode only interprets ** when it's by + -- The spec does not describe this, but VSCode only interprets ** when it's by -- itself in a path segment, and otherwise interprets ** as consecutive * directives. - -- The following tests show how this behavior should work, but is not yet fully implemented. - -- Currently, "a**" parses incorrectly as "a" "**" and "**a" parses correctly as "*" "*" "a". -- see: https://github.com/microsoft/vscode/blob/eef30e7165e19b33daa1e15e92fa34ff4a5df0d3/src/vs/base/common/glob.ts#L112 eq(true, match('a**', 'abc')) -- '**' should parse as two '*'s when not by itself in a path segment eq(true, match('**c', 'abc')) - -- eq(false, match('a**', 'ab')) -- each '*' should still represent at least one character + eq(false, match('a**', 'ab')) -- each '*' should still represent at least one character eq(false, match('**c', 'bc')) eq(true, match('a**', 'abcd')) eq(true, match('**d', 'abcd')) - -- eq(false, match('a**', 'abc/d')) + eq(false, match('a**', 'abc/d')) eq(false, match('**d', 'abc/d')) end) |