diff options
| author | Baptiste Fontaine | 2015-01-01 13:35:17 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-01 14:27:34 +0000 |
| commit | a4db521f4e6d806dfbfe6081da74cb45210e9df3 (patch) | |
| tree | 2da4068115616b896a9c537bfd1435d922ea94c7 /Library/Formula | |
| parent | 4244d9026e7cc39529b85c2f60332f9c64b24b7a (diff) | |
| download | homebrew-a4db521f4e6d806dfbfe6081da74cb45210e9df3.tar.bz2 | |
zshdb: modernize + test
Closes #35416.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/zshdb.rb | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/Library/Formula/zshdb.rb b/Library/Formula/zshdb.rb index f7833b6c5..004bd5b09 100644 --- a/Library/Formula/zshdb.rb +++ b/Library/Formula/zshdb.rb @@ -1,17 +1,15 @@ -require 'formula' - class Zshdb < Formula - homepage 'https://github.com/rocky/zshdb' - url 'https://downloads.sourceforge.net/project/bashdb/zshdb/0.08/zshdb-0.08.tar.bz2' - sha1 '29f860d0130debe6a966ee1e12f2f3046c78897b' + homepage "https://github.com/rocky/zshdb" + url "https://downloads.sourceforge.net/project/bashdb/zshdb/0.08/zshdb-0.08.tar.bz2" + sha1 "29f860d0130debe6a966ee1e12f2f3046c78897b" head do - url 'https://github.com/rocky/zshdb.git' + url "https://github.com/rocky/zshdb.git" depends_on "autoconf" => :build depends_on "automake" => :build end - depends_on 'zsh' + depends_on "zsh" def install if build.head? @@ -22,6 +20,14 @@ class Zshdb < Formula system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--with-zsh=#{HOMEBREW_PREFIX}/bin/zsh" - system "make install" + system "make", "install" + end + + test do + require "open3" + Open3.popen3("#{bin}/zshdb -c 'echo test'") do |stdin, stdout, _| + stdin.write "exit\n" + !!(stdout.read =~ /That's all, folks/) + end end end |
