From 846b89662621c2139eeb519b2769d70271a5b348 Mon Sep 17 00:00:00 2001 From: Trever Miller Date: Tue, 22 Nov 2011 12:18:12 -0700 Subject: whatmask: add test Closes #8736. Signed-off-by: Jack Nagel --- Library/Formula/whatmask.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/whatmask.rb b/Library/Formula/whatmask.rb index 247a4714d..9e15e0f54 100644 --- a/Library/Formula/whatmask.rb +++ b/Library/Formula/whatmask.rb @@ -11,4 +11,19 @@ class Whatmask < Formula "--prefix=#{prefix}" system "make install" end + + def test + %x[#{bin}/whatmask /24].eql? <<-EOS + +--------------------------------------------- + TCP/IP SUBNET MASK EQUIVALENTS +--------------------------------------------- +CIDR = .....................: /24 +Netmask = ..................: 255.255.255.0 +Netmask (hex) = ............: 0xffffff00 +Wildcard Bits = ............: 0.0.0.255 +Usable IP Addresses = ......: 254 + +EOS + end end -- cgit v1.2.3