From be3e02455517444c98003538199906ffb74df86d Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Sun, 1 Dec 2024 19:06:20 -0500 Subject: [PATCH] zshdb: test with pipe_output --- Formula/z/zshdb.rb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Formula/z/zshdb.rb b/Formula/z/zshdb.rb index 658c93bbce651..bf689fed86186 100644 --- a/Formula/z/zshdb.rb +++ b/Formula/z/zshdb.rb @@ -41,13 +41,10 @@ def install test do require "open3" - Open3.popen3("#{bin}/zshdb -c 'echo test'") do |stdin, stdout, _| - stdin.write "exit\n" - assert_match <<~EOS, stdout.read - echo test - test - Debugged program terminated normally. - EOS - end + assert_match <<~EOS, pipe_output("#{bin}/zshdb -c 'echo test'", "exit\n") + echo test + test + Debugged program terminated normally. + EOS end end