From 9e3be69de08a9c4456ad47e2ad8c193424e47daa Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 30 Jul 2014 21:04:17 -0500 Subject: x265: use binwrite in test --- Library/Formula/x265.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/x265.rb b/Library/Formula/x265.rb index b1e212d75..43b712b38 100644 --- a/Library/Formula/x265.rb +++ b/Library/Formula/x265.rb @@ -34,11 +34,9 @@ class X265 < Formula test do yuv_path = testpath/"raw.yuv" x265_path = testpath/"x265.265" - File.open(yuv_path, 'wb') do |f| - (1..3200).each do f.write("\xCO\xFF\xEE") end - end + yuv_path.binwrite "\xCO\xFF\xEE" * 3200 system "#{bin}/x265 --input-res 80x80 --fps 1 #{yuv_path} #{x265_path}" header = 'AAAAAUABDAH//w==' assert_equal header.unpack("m"), [x265_path.read(10)] - end + end end -- cgit v1.2.3