From c0fd4ed19ede9a3cc3ad4279e154ec6c05bf8e10 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Wed, 21 Jul 2021 13:22:45 +0800 Subject: [PATCH] Update tiv.rb --- tiv.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tiv.rb b/tiv.rb index b7ae8e9..6d0b8f9 100644 --- a/tiv.rb +++ b/tiv.rb @@ -4,7 +4,7 @@ class Tiv < Formula url "https://github.com/stefanhaustein/TerminalImageViewer/archive/v1.1.0.tar.gz" sha256 "727ddaa048643cb0a13e23bc308415060d99d8b1853883ad339ad7b952050d61" head "https://github.com/stefanhaustein/TerminalImageViewer.git" - depends_on "gcc" => :build unless OS.linux? + uses_from_macos "curl" => :test depends_on "imagemagick" def install @@ -24,7 +24,9 @@ class Tiv < Formula test do # Downloads a public domain test file from wikimedia commons and displays it. # NOTE: Test will fail. Will fix when I get to my mac. - assert_equal "", - shell_output("#{bin}/tiv -0 -w 400 -h 400 https://upload.wikimedia.org/wikipedia/commons/2/24/Cornell_box.png").strip + system "curl -o \"test.png\" https://upload.wikimedia.org/wikipedia/commons/2/24/Cornell_box.png" + assert_equal "â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„ +", + shell_output("#{bin}/tiv -0 -w 400 -h 400 test.png").strip end end