You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The .exit_code directive allows a non zero exit status to be declared as the expected result for a given Unit Test. By default, zero (0) is the normal exit status when executing a Unit Test and a non zero status would fail the test.
where:
.exit_code Is the name of the directive.
= A numeric value indicating the expected exit status for the Unit Test. From the example, the Unit Test is behaving as expected when returning a value of 42 – therefore, the test would not be marked as a failure despite it returning a non zero exit code, since it matches what was declared in the directive. Specifying a zero value for this directive is allowed but not needed, since it is the implied default.
Hi, I like to test for the exit code.
Below is a minimum example
how to capture the exit code, such as 1, 2? I have try
cr_fail()
,cr_exit()
without luck.Thanks
The text was updated successfully, but these errors were encountered: