From 13afe7e12e3cd761db26e43a8a43cd81d0f044cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Tue, 12 Nov 2024 15:52:49 +0100 Subject: [PATCH] Add expectation for exit code propagation --- spec/primitives/external_command_spec.cr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/primitives/external_command_spec.cr b/spec/primitives/external_command_spec.cr index 5e9b40a65dfb..3d0e755f9e4e 100644 --- a/spec/primitives/external_command_spec.cr +++ b/spec/primitives/external_command_spec.cr @@ -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]) @@ -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,