Skip to content

Commit

Permalink
fixup spec
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Dec 20, 2024
1 parent 46b2362 commit ed9ada6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/std/process/status_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ describe Process::Status do
end

it "#system_exit_status" do
Process::Status.new(exit_status(0)).exit_status.should eq 0_u32
Process::Status.new(exit_status(1)).exit_status.should eq({{ flag?(:unix) ? 0x0100_u32 : 1_u32 }})
Process::Status.new(exit_status(127)).exit_status.should eq({{ flag?(:unix) ? 0x7f00_u32 : 127_u32 }})
Process::Status.new(exit_status(128)).exit_status.should eq({{ flag?(:unix) ? 0x8000_u32 : 128_u32 }})
Process::Status.new(exit_status(255)).exit_status.should eq({{ flag?(:unix) ? 0xFF00_u32 : 255_u32 }})
Process::Status.new(exit_status(0)).system_exit_status.should eq 0_u32
Process::Status.new(exit_status(1)).system_exit_status.should eq({{ flag?(:unix) ? 0x0100_u32 : 1_u32 }})
Process::Status.new(exit_status(127)).system_exit_status.should eq({{ flag?(:unix) ? 0x7f00_u32 : 127_u32 }})
Process::Status.new(exit_status(128)).system_exit_status.should eq({{ flag?(:unix) ? 0x8000_u32 : 128_u32 }})
Process::Status.new(exit_status(255)).system_exit_status.should eq({{ flag?(:unix) ? 0xFF00_u32 : 255_u32 }})

status_for(:interrupted).exit_status.should eq({% if flag?(:unix) %}Signal::INT.value{% else %}LibC::STATUS_CONTROL_C_EXIT{% end %})
status_for(:interrupted).system_exit_status.should eq({% if flag?(:unix) %}Signal::INT.value{% else %}LibC::STATUS_CONTROL_C_EXIT{% end %})
end

it "#success?" do
Expand Down

0 comments on commit ed9ada6

Please sign in to comment.