pstree: add test

Closes Homebrew/homebrew#26534.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
master
Mike Naberezny 2014-02-08 11:45:21 -08:00 committed by Mike McQuaid
parent 0951febe08
commit e45dfa9bb9
1 changed files with 7 additions and 0 deletions

View File

@ -9,4 +9,11 @@ class Pstree < Formula
system "make pstree"
bin.install "pstree"
end
test do
lines = `#{bin}/pstree #{Process.pid}`.strip.split("\n")
assert lines[0].include?($0)
assert lines[1].include?("#{bin}/pstree")
assert_equal 0, $?.exitstatus
end
end