m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 00:03:39 -05:00

Underscore boundaries should be ranked lower

This commit is contained in:
Junegunn Choi
2024-08-16 19:20:30 +09:00
parent c0f27751d3
commit 4ae3069c6f
2 changed files with 28 additions and 1 deletions

View File

@@ -3366,6 +3366,14 @@ class TestGoFZF < TestBase
tmux.send_keys :Space
tmux.until { |lines| assert_includes lines[-3], 'bar' }
end
def test_boundary_match
# Underscore boundaries should be ranked lower
assert_equal(
%w[[x] -x- -x_ _x- _x_],
`printf -- 'xxx\n-xx\nxx-\n_x_\n_x-\n-x_\n[x]\n-x-\n' | #{FZF} -f"'x'"`.lines(chomp: true)
)
end
end
module TestShell