Skip to content

Commit 13afe7e

Browse files
Add expectation for exit code propagation
1 parent 4ff8ad5 commit 13afe7e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/primitives/external_command_spec.cr

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ describe Crystal::Command do
1212
puts Process.find_executable("crystal")
1313
puts PROGRAM_NAME
1414
puts ARGV
15+
16+
exit 123
1517
CRYSTAL
1618

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

2931
status = process.wait
30-
status.success?.should be_true
32+
status.normal_exit?.should be_true
33+
status.exit_code.should eq 123
3134

3235
lines.should eq [
3336
compiler_path,

0 commit comments

Comments
 (0)