aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXu Cheng2014-12-31 15:00:14 +0800
committerMike McQuaid2014-12-31 14:51:59 +0000
commite1497bef94b6f723f90852c1bb7b36d0411ad4e1 (patch)
tree325491bbc11dc52853da37fa60c0e9084a2c071c
parent69e3e9d328b2cdc39c1bd8f3e922c86a262516f0 (diff)
downloadhomebrew-e1497bef94b6f723f90852c1bb7b36d0411ad4e1.tar.bz2
gnu-barcode: add test
Closes #35383. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/gnu-barcode.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/Library/Formula/gnu-barcode.rb b/Library/Formula/gnu-barcode.rb
index 9cab4f1dd..2ce0a38fe 100644
--- a/Library/Formula/gnu-barcode.rb
+++ b/Library/Formula/gnu-barcode.rb
@@ -1,10 +1,8 @@
-require 'formula'
-
class GnuBarcode < Formula
- homepage 'http://www.gnu.org/software/barcode/'
- url 'http://ftpmirror.gnu.org/barcode/barcode-0.98.tar.gz'
- mirror 'http://ftp.gnu.org/gnu/barcode/barcode-0.98.tar.gz'
- sha1 '15b9598bcaa67bcff1f63309d1a18840b9a12899'
+ homepage "http://www.gnu.org/software/barcode/"
+ url "http://ftpmirror.gnu.org/barcode/barcode-0.98.tar.gz"
+ mirror "http://ftp.gnu.org/gnu/barcode/barcode-0.98.tar.gz"
+ sha1 "15b9598bcaa67bcff1f63309d1a18840b9a12899"
def install
system "./configure", "--disable-debug",
@@ -16,4 +14,10 @@ class GnuBarcode < Formula
"INFODIR=#{info}",
"install"
end
+
+ test do
+ (testpath/"test.txt").write("12345")
+ system "#{bin}/barcode", "-e", "CODE39", "-i", "test.txt", "-o", "test.ps"
+ assert File.read("test.ps").start_with?("")
+ end
end