File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11class Mdfried < Formula
22 desc "Terminal markdown viewer"
33 homepage "https://github.com/benjajaja/mdfried"
4- url "https://github.com/benjajaja/mdfried/archive/refs/tags/v0.18.2 .tar.gz"
5- sha256 "af31a4ca3215a54ea826246cba8b2fbbb957164fd8ee7f8f253f751e98ff4ee9 "
4+ url "https://github.com/benjajaja/mdfried/archive/refs/tags/v0.18.3 .tar.gz"
5+ sha256 "c19f3e678b758b565c3931a1d6ab4860694cdc9c9bba36ecb580c16a35ab2a87 "
66 license "GPL-3.0-or-later"
77 head "https://github.com/benjajaja/mdfried.git" , branch : "master"
88
@@ -35,15 +35,17 @@ def install
3535 # Hello World
3636 MARKDOWN
3737
38- cmd = " #{ bin } /mdfried #{ testpath } /test.md 2>&1 "
39- output = if OS . mac?
40- shell_output ( cmd )
38+ output_log = testpath / "output.log "
39+ pid = if OS . mac?
40+ spawn bin / "mdfried" , testpath / "test.md" , [ :out , :err ] => output_log . to_s
4141 else
4242 require "pty"
43- r , _w , pid = PTY . spawn ( { "FONTCONFIG_FILE" => "#{ etc } /fonts/fonts.conf" } , cmd )
44- Process . wait ( pid )
45- r . read_nonblock ( 1024 )
43+ PTY . spawn ( "#{ bin } /mdfried #{ testpath } /test.md" , [ :out , :err ] => output_log . to_s ) . last
4644 end
47- assert_match "cursor position could not be read" , output
45+ sleep 3
46+ assert_match "Detecting supported graphics protocols..." , output_log . read
47+ ensure
48+ Process . kill ( "TERM" , pid )
49+ Process . wait ( pid )
4850 end
4951end
You can’t perform that action at this time.
0 commit comments