diff options
| author | Xu Cheng | 2014-12-30 18:35:01 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-30 11:21:09 +0000 |
| commit | 13fed834898564bdcfd5e718689368b59e34cb51 (patch) | |
| tree | b1f4c660f730b3fc54415d16ef22584b0462093a /Library | |
| parent | 9d1570ede4ef8a47829bab05837ddd2a8112523c (diff) | |
| download | homebrew-13fed834898564bdcfd5e718689368b59e34cb51.tar.bz2 | |
libsodium: add test
Closes #35355.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/libsodium.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Library/Formula/libsodium.rb b/Library/Formula/libsodium.rb index 021cc86e3..7dba76889 100644 --- a/Library/Formula/libsodium.rb +++ b/Library/Formula/libsodium.rb @@ -1,5 +1,3 @@ -require "formula" - class Libsodium < Formula homepage "https://github.com/jedisct1/libsodium/" url "https://github.com/jedisct1/libsodium/releases/download/1.0.1/libsodium-1.0.1.tar.gz" @@ -31,4 +29,19 @@ class Libsodium < Formula system "make", "check" system "make", "install" end + + test do + (testpath/"test.c").write <<-EOS.undent + #include <assert.h> + #include <sodium.h> + + int main() + { + assert(sodium_init() != -1); + return 0; + } + EOS + system ENV.cc, "test.c", "-lsodium", "-o", "test" + system "./test" + end end |
