From 9b5acdff63d63aafaf35dfb66fbd41be6a37c739 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Wed, 18 Feb 2015 23:26:04 +0800 Subject: pngpaste: add test Closes #36934. Signed-off-by: Xu Cheng --- Library/Formula/pngpaste.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3