summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-08-17 18:23:42 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-08-29 17:08:23 +0900
commitf510a4def638b03e9001237e62e5ed2a2bcea2c6 (patch)
tree59a388ba2cdc72a33ce0b0270d82247d99a9a273 /test
parent4ae3069c6fc3e3f2427557bf4813867a621c79ad (diff)
downloadfzf-f510a4def638b03e9001237e62e5ed2a2bcea2c6.tar.gz
Test cases for non-default --scheme options
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_go.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/test_go.rb b/test/test_go.rb
index c328a226..ac294d62 100755
--- a/test/test_go.rb
+++ b/test/test_go.rb
@@ -3369,10 +3369,14 @@ class TestGoFZF < TestBase
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)
- )
+ {
+ default: [' x '] + %w[/x/ [x] -x- -x_ _x- _x_],
+ path: ['/x/', ' x '] + %w[[x] -x- -x_ _x- _x_],
+ history: ['[x]', '-x-', ' x '] + %w[/x/ -x_ _x- _x_]
+ }.each do |scheme, expected|
+ result = `printf -- 'xxx\n-xx\nxx-\n_x_\n_x-\n-x_\n[x]\n-x-\n x \n/x/\n' | #{FZF} -f"'x'" --scheme=#{scheme}`.lines(chomp: true)
+ assert_equal expected, result
+ end
end
end