From 45a3655eafa5ebd2de133e3d3bc39263c32d306b Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 8 Jun 2015 23:27:50 +0900 Subject: [PATCH] Add test case for --null option --- test/test_go.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_go.rb b/test/test_go.rb index 35caea7..160699c 100644 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -536,6 +536,13 @@ class TestGoFZF < TestBase ensure File.unlink tempname 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 def writelines path, lines File.unlink path while File.exists? path