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

Fix compatibility issues with OR operator and inverse terms

This commit is contained in:
Junegunn Choi
2015-11-10 01:50:41 +09:00
parent e7e86b68f4
commit 31278bcc68
4 changed files with 22 additions and 9 deletions

View File

@@ -933,6 +933,12 @@ class TestGoFZF < TestBase
assert_equal 4, `seq 123 | #{FZF} -f 13 +e`.lines.length
end
def test_or_operator
assert_equal %w[1 5 10], `seq 10 | #{FZF} -f "1 | 5"`.lines.map(&:chomp)
assert_equal %w[1 10 2 3 4 5 6 7 8 9],
`seq 10 | #{FZF} -f '1 | !1'`.lines.map(&:chomp)
end
private
def writelines path, lines
File.unlink path while File.exists? path