Skip to content

Commit

Permalink
Add expectation for exit code propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Nov 12, 2024
1 parent 4ff8ad5 commit 13afe7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/primitives/external_command_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ describe Crystal::Command do
puts Process.find_executable("crystal")
puts PROGRAM_NAME
puts ARGV
exit 123
CRYSTAL

Process.run(compiler_path, ["build", source_file, "-o", command_path])
Expand All @@ -27,7 +29,8 @@ describe Crystal::Command do
lines = process.output.gets_to_end.lines

status = process.wait
status.success?.should be_true
status.normal_exit?.should be_true
status.exit_code.should eq 123

lines.should eq [
compiler_path,
Expand Down

0 comments on commit 13afe7e

Please sign in to comment.