Add test case for --null option
This commit is contained in:
parent
81ffde92fb
commit
45a3655eaf
@ -536,6 +536,13 @@ class TestGoFZF < TestBase
|
|||||||
ensure
|
ensure
|
||||||
File.unlink tempname
|
File.unlink tempname
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_null
|
||||||
|
lines = `find .`.split($/)
|
||||||
|
assert_equal lines.last, `find . | #{FZF} -e -f "^#{lines.last}$"`.chomp
|
||||||
|
assert_equal lines.last, `find . -print0 | #{FZF} --null -e -f "^#{lines.last}$"`.chomp
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def writelines path, lines
|
def writelines path, lines
|
||||||
File.unlink path while File.exists? path
|
File.unlink path while File.exists? path
|
||||||
|
Loading…
Reference in New Issue
Block a user