homebrew-core/Formula/ent.rb

32 lines
1.3 KiB
Ruby
Raw Normal View History

class Ent < Formula
desc "Pseudorandom number sequence test program"
2015-10-16 15:24:36 +00:00
homepage "https://www.fourmilab.ch/random/"
# This tarball is versioned and smaller, though non-official
url "https://github.com/psm14/ent/archive/1.0.tar.gz"
sha256 "6316b9956f2e0cc39f2b934f3c53019eafe2715316c260fd5c1e5ef4523ae520"
def install
system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}"
bin.install "ent"
# Used in the below test
prefix.install "entest.mas", "entitle.gif"
end
2013-02-02 05:12:33 +00:00
test do
# Adapted from the test in the Makefile and entest.bat
2013-02-02 05:12:33 +00:00
system "#{bin}/ent #{prefix}/entitle.gif > entest.bak"
# The single > here was also in entest.bat
system "#{bin}/ent -c #{prefix}/entitle.gif > entest.bak"
system "#{bin}/ent -fc #{prefix}/entitle.gif >> entest.bak"
system "#{bin}/ent -b #{prefix}/entitle.gif >> entest.bak"
system "#{bin}/ent -bc #{prefix}/entitle.gif >> entest.bak"
system "#{bin}/ent -t #{prefix}/entitle.gif >> entest.bak"
system "#{bin}/ent -ct #{prefix}/entitle.gif >> entest.bak"
system "#{bin}/ent -ft #{prefix}/entitle.gif >> entest.bak"
system "#{bin}/ent -bt #{prefix}/entitle.gif >> entest.bak"
system "#{bin}/ent -bct #{prefix}/entitle.gif >> entest.bak"
system "diff entest.bak #{prefix}/entest.mas"
end
end