homebrew-core/Formula/tio.rb

29 lines
1.2 KiB
Ruby
Raw Permalink Normal View History

class Tio < Formula
desc "Simple TTY terminal I/O application"
homepage "https://tio.github.io"
url "https://github.com/tio/tio/releases/download/v1.32/tio-1.32.tar.xz"
sha256 "a8f5ed6994cacb96780baa416b19e5a6d7d67e8c162a8ea4fd9eccd64984ae44"
2019-11-26 00:16:57 +00:00
bottle do
cellar :any_skip_relocation
sha256 "a630b860983adbd4c2691538739850ef934aeafcfa33c5561a00e3db2b355e88" => :catalina
sha256 "f33b4bc0d653c0f2111f0c30865395d2cadfe524f33ab1c84c843e54ec432ed9" => :mojave
sha256 "1241b11c102b527fd43225a3283290fe5488889a9e0919e7b4b536ddcb4a4d83" => :high_sierra
end
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--with-bash-completion-dir=#{bash_completion}"
system "make", "install"
end
test do
# Test that tio emits the correct error output when run with an argument that is not a tty.
# Use `script` to run tio with its stdio attached to a PTY, otherwise it will complain about that instead.
assert_match /Error: Not a tty device/, shell_output("script -q /dev/null #{bin}/tio /dev/null", 1).strip
end
end