Permalink
Browse files

hostdb: add test; `brew audit --strict`

Closes Homebrew/legacy-homebrew#41227.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
  • Loading branch information...
L2G authored and dunn committed Jul 13, 2015
1 parent 0c8a2ba commit daec1ec1b79ec17d4308c2c75a1dcd1e338f52c7
Showing with 12 additions and 8 deletions.
  1. +12 −8 Formula/hostdb.rb
View
@@ -1,14 +1,18 @@
require 'formula'
class Hostdb < Formula
desc "Generate DNS zones and DHCP configuration from hostlist.txt"
homepage 'http://code.google.com/p/hostdb/'
url 'https://hostdb.googlecode.com/files/hostdb-1.004.tgz'
sha1 '65ec59c2c88b763813fa611d8fd28a45cd9d5278'
homepage "https://code.google.com/p/hostdb/"
url "https://hostdb.googlecode.com/files/hostdb-1.004.tgz"
sha256 "beea7cfcdc384eb40d0bc8b3ad2eb094ee81ca75e8eef7c07ea4a47e9f0da350"
def install
bin.install Dir['bin/*']
doc.install Dir['docs/*']
(share+'examples'+name).install Dir['examples/*']
bin.install Dir["bin/*"]
doc.install Dir["docs/*"]
(share+"examples"+name).install Dir["examples/*"]
end
test do
system("#{bin}/mkzones -z #{share}/examples/#{name}/example1/zoneconf.txt < #{share}/examples/#{name}/example1/hostdb.txt")
expected = /^4 \s+ IN \s+ PTR \s+ vector\.example\.com\.$/x
assert_match(expected, (testpath/"INTERNAL.179.32.64.in-addr.arpa").read)
end
end

0 comments on commit daec1ec

Please sign in to comment.