mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-25 22:27:41 +00:00
Add failing test case for #329
This commit is contained in:
parent
8fb31e1b4d
commit
80ed02e72e
@ -774,6 +774,16 @@ class TestGoFZF < TestBase
|
||||
tmux.until { |lines| lines.any? { |l| l.include? 'Invalid $TERM: xxx' } }
|
||||
end
|
||||
|
||||
def test_with_nth
|
||||
writelines tempname, ['hello world ', 'byebye']
|
||||
assert_equal 'hello world ', `cat #{tempname} | #{FZF} -f"^he hehe" -x -n 2.. --with-nth 2,1,1`.chomp
|
||||
end
|
||||
|
||||
def test_with_nth_ansi
|
||||
writelines tempname, ["\x1b[33mhello \x1b[34;1mworld\x1b[m ", 'byebye']
|
||||
assert_equal 'hello world ', `cat #{tempname} | #{FZF} -f"^he hehe" -x -n 2.. --with-nth 2,1,1 --ansi`.chomp
|
||||
end
|
||||
|
||||
private
|
||||
def writelines path, lines
|
||||
File.unlink path while File.exists? path
|
||||
|
Loading…
Reference in New Issue
Block a user