aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-07-30 21:04:17 -0500
committerJack Nagel2014-07-30 21:04:17 -0500
commit9e3be69de08a9c4456ad47e2ad8c193424e47daa (patch)
tree7fe9606b0ee9a219702d367594f96ebc58cc2eb5
parente9583da2aece26c1967a2b43052c130048010b00 (diff)
downloadhomebrew-9e3be69de08a9c4456ad47e2ad8c193424e47daa.tar.bz2
x265: use binwrite in test
-rw-r--r--Library/Formula/x265.rb6
1 files changed, 2 insertions, 4 deletions
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