diff options
| author | Xu Cheng | 2015-02-18 23:26:04 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-02-18 23:42:01 +0800 |
| commit | 9b5acdff63d63aafaf35dfb66fbd41be6a37c739 (patch) | |
| tree | b4d9676aa1273a916e516c18df3ea0a0633a62b9 /Library | |
| parent | 77f842a2de081824a6e3f1af192aff99a78594dd (diff) | |
| download | homebrew-9b5acdff63d63aafaf35dfb66fbd41be6a37c739.tar.bz2 | |
pngpaste: add test
Closes #36934.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/pngpaste.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Formula/pngpaste.rb b/Library/Formula/pngpaste.rb index ab9b55af7..5ac01b6d3 100644 --- a/Library/Formula/pngpaste.rb +++ b/Library/Formula/pngpaste.rb @@ -1,5 +1,3 @@ -require "formula" - class Pngpaste < Formula homepage "https://github.com/jcsalterego/pngpaste" url "https://github.com/jcsalterego/pngpaste/archive/0.2.1.tar.gz" @@ -9,4 +7,11 @@ class Pngpaste < Formula system "make", "all" bin.install "pngpaste" end + + test do + png = test_fixtures("test.png") + system "osascript", "-e", "set the clipboard to POSIX file (\"#{png}\")" + system bin/"pngpaste", "test.png" + assert File.exist? "test.png" + end end |
