Module assert_status

Module assert_status 

Source
Expand description

Assert for comparing status concepts.

These macros help with commands, program, processes, and anything else that provides a method status(), and optionally status methods such as:

  • success() => bool
  • code() => Result(T, E)

Try success/failure:

Compare a status code with another status code:

Compare a status code with an expression:

§Example

use assertables::*;
use std::process::Command;

let mut a = Command::new("bin/exit-with-arg"); a.arg("1");
let mut b = Command::new("bin/exit-with-arg"); b.arg("1");
assert_status_code_value_eq!(a, b);

Modules§

assert_status_code_value_eq
Assert a status code value is equal to another.
assert_status_code_value_eq_x
Assert a status code value is equal to an expression.
assert_status_code_value_ge
Assert a status code value is greater than or equal to another.
assert_status_code_value_ge_x
Assert a status code value is greater than or equal to an expression.
assert_status_code_value_gt
Assert a status code value is greater than another.
assert_status_code_value_gt_x
Assert a status code value is greater than an expression.
assert_status_code_value_le
Assert a status code value is less than or equal to another.
assert_status_code_value_le_x
Assert a status code value is less than or equal to an expression.
assert_status_code_value_lt
Assert a status code value is less than another.
assert_status_code_value_lt_x
Assert a status code value is less than an expression.
assert_status_code_value_ne
Assert a status code value is not equal to another.
assert_status_code_value_ne_x
Assert a status code value is not equal to another.
assert_status_failure
Assert a status is a failure.
assert_status_success
Assert a status is a success.
assert_status_success_false
Assert a status is a failure.