From 79449a6a985785e596a1ba1c6b694885a3ee2604 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 2 Jan 2025 21:42:17 -0500 Subject: [PATCH 1/8] bigloo: check pipe_output exit code --- Formula/b/bigloo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/b/bigloo.rb b/Formula/b/bigloo.rb index c806b29fcbc37..c3b4f29d6c0f2 100644 --- a/Formula/b/bigloo.rb +++ b/Formula/b/bigloo.rb @@ -86,6 +86,6 @@ def install (newline) (exit) SCHEME - assert_match "Hello World!\n", pipe_output("#{bin}/bigloo -i -", program) + assert_match "Hello World!\n", pipe_output("#{bin}/bigloo -i -", program, 0) end end From 6fbe349b22a9e4a810eca0e9567575a447d8c6c1 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 2 Jan 2025 21:42:57 -0500 Subject: [PATCH 2/8] bk: test with shell_output --- Formula/b/bk.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/b/bk.rb b/Formula/b/bk.rb index 4e9e97aa7ea6e..be86302ce4930 100644 --- a/Formula/b/bk.rb +++ b/Formula/b/bk.rb @@ -25,7 +25,7 @@ def install test do test_epub = test_fixtures("test.epub") - output = pipe_output("#{bin}/bk --meta #{test_epub}") + output = shell_output("#{bin}/bk --meta #{test_epub}") assert_match "language: en", output end end From e203325f065fa8529106d92ef40eea80c26e83ce Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 2 Jan 2025 21:43:47 -0500 Subject: [PATCH 3/8] blahtexml: check pipe_output exit code --- Formula/b/blahtexml.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/b/blahtexml.rb b/Formula/b/blahtexml.rb index 053b2461dda59..87b85e685c275 100644 --- a/Formula/b/blahtexml.rb +++ b/Formula/b/blahtexml.rb @@ -32,7 +32,7 @@ def install test do input = '\sqrt{x^2+\alpha}' - output = pipe_output("#{bin}/blahtex --mathml", input) + output = pipe_output("#{bin}/blahtex --mathml", input, 0) assert_match "x2 Date: Thu, 2 Jan 2025 21:44:26 -0500 Subject: [PATCH 4/8] bootloadhid: test with shell_output --- Formula/b/bootloadhid.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/b/bootloadhid.rb b/Formula/b/bootloadhid.rb index 9a182d26da46e..f8d5eba05d2fe 100644 --- a/Formula/b/bootloadhid.rb +++ b/Formula/b/bootloadhid.rb @@ -36,6 +36,6 @@ def install test do touch "test.hex" - assert_equal "No data in input file, exiting.", pipe_output("#{bin}/bootloadHID -r test.hex 2>&1").strip + assert_equal "No data in input file, exiting.", shell_output("#{bin}/bootloadHID -r test.hex 2>&1").strip end end From 0265b2169b857ae19e8f6b2fc386f4548a935695 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 2 Jan 2025 21:44:55 -0500 Subject: [PATCH 5/8] boxes: check pipe_output exit code --- Formula/b/boxes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/b/boxes.rb b/Formula/b/boxes.rb index 4dd02c7685f18..90472128a32ec 100644 --- a/Formula/b/boxes.rb +++ b/Formula/b/boxes.rb @@ -34,6 +34,6 @@ def install end test do - assert_match "test brew", pipe_output(bin/"boxes", "test brew") + assert_match "test brew", pipe_output(bin/"boxes", "test brew", 0) end end From 56c24c3203c128883f80ffa46399107a28d5facb Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 2 Jan 2025 21:45:17 -0500 Subject: [PATCH 6/8] bsdconv: check pipe_output exit code --- Formula/b/bsdconv.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/b/bsdconv.rb b/Formula/b/bsdconv.rb index 432dc56e68efa..37252c830f38f 100644 --- a/Formula/b/bsdconv.rb +++ b/Formula/b/bsdconv.rb @@ -27,7 +27,7 @@ def install end test do - output = pipe_output("#{bin}/bsdconv BIG5:UTF-8", "\263\134\273\134") + output = pipe_output("#{bin}/bsdconv BIG5:UTF-8", "\263\134\273\134", 0) output.force_encoding("UTF-8") if output.respond_to?(:force_encoding) assert_equal "許蓋", output end From 5b46e100ab949e7cc15d63c8972dd7e6acce70a7 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 2 Jan 2025 21:45:59 -0500 Subject: [PATCH 7/8] btpd: test with shell_output --- Formula/b/btpd.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/b/btpd.rb b/Formula/b/btpd.rb index 2612e24ee637b..0aa3c86eedace 100644 --- a/Formula/b/btpd.rb +++ b/Formula/b/btpd.rb @@ -33,6 +33,6 @@ def install end test do - assert_match "Torrents can be specified", pipe_output("#{bin}/btcli --help 2>&1") + assert_match "Torrents can be specified", shell_output("#{bin}/btcli --help 2>&1", 1) end end From 6770838cfdfab6e8f46d6d5f52b803bd74342cc4 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 2 Jan 2025 21:46:38 -0500 Subject: [PATCH 8/8] bwidget: check pipe_output exit code --- Formula/b/bwidget.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/b/bwidget.rb b/Formula/b/bwidget.rb index e3e12736f0b8f..d036b3ef2a537 100644 --- a/Formula/b/bwidget.rb +++ b/Formula/b/bwidget.rb @@ -29,6 +29,6 @@ def install puts [package require BWidget] exit TCL - assert_equal version.to_s, pipe_output("#{Formula["tcl-tk"].bin}/tclsh", test_bwidget).chomp + assert_equal version.to_s, pipe_output(Formula["tcl-tk"].bin/"tclsh", test_bwidget, 0).chomp end end