disktype: add test

Closes Homebrew/homebrew#26579.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
master
Mike Naberezny 2014-02-10 10:54:11 -08:00 committed by Mike McQuaid
parent c217be0c94
commit 05a1a9a2ec
1 changed files with 9 additions and 0 deletions

View File

@ -12,4 +12,13 @@ class Disktype < Formula
bin.install "disktype" bin.install "disktype"
man1.install "disktype.1" man1.install "disktype.1"
end end
test do
path = testpath/"foo"
path.write "1234"
output = `#{bin}/disktype #{path}`
assert output.include?("Regular file, size 4 bytes")
assert_equal 0, $?.exitstatus
end
end end