diff options
| author | Xu Cheng | 2014-12-30 21:33:24 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-30 14:15:03 +0000 |
| commit | 2620384c74386aba80cf52583f0da4efc716e11e (patch) | |
| tree | a75ed6036934b48de1140d2239d140120f2f6580 /Library | |
| parent | 8145547541903df92adec954cd6021a2b957b61c (diff) | |
| download | homebrew-2620384c74386aba80cf52583f0da4efc716e11e.tar.bz2 | |
libtasn1: add test
Closes #35361.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/libtasn1.rb | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/Library/Formula/libtasn1.rb b/Library/Formula/libtasn1.rb index 822607f37..0f8e6702d 100644 --- a/Library/Formula/libtasn1.rb +++ b/Library/Formula/libtasn1.rb @@ -1,5 +1,3 @@ -require "formula" - class Libtasn1 < Formula homepage "https://www.gnu.org/software/libtasn1/" url "http://ftpmirror.gnu.org/libtasn1/libtasn1-4.2.tar.gz" @@ -19,6 +17,26 @@ class Libtasn1 < Formula def install ENV.universal_binary if build.universal? system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking" - system "make install" + system "make", "install" + end + + test do + (testpath/"pkix.asn").write <<-EOS.undent + PKIX1 { } + DEFINITIONS IMPLICIT TAGS ::= + BEGIN + Dss-Sig-Value ::= SEQUENCE { + r INTEGER, + s INTEGER + } + END + EOS + (testpath/"assign.asn1").write <<-EOS.undent + dp PKIX1.Dss-Sig-Value + r 42 + s 47 + EOS + system "#{bin}/asn1Coding", "pkix.asn", "assign.asn1" + assert_match /Decoding: SUCCESS/, shell_output("#{bin}/asn1Decoding pkix.asn assign.out PKIX1.Dss-Sig-Value 2>&1") end end |
