Skip to content

Commit

Permalink
zshdb: test with pipe_output
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed Dec 2, 2024
1 parent 05bb301 commit be3e024
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Formula/z/zshdb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit be3e024

Please sign in to comment.