assertables

Module assert_program_args

source
Expand description

Assert macros for comparing programs with arguments.

These macros help with calling external programs with arguments, then capturing the standard output stream and standard error stream.

These macros have corresponding macros in the module assert_command.

Compare command using program and arguments to standard output:

Compare command using program and arguments to standard output:

§Example

let a_program = "bin/printf-stdout";
let a_args = ["%s", "hello"];
let b_program = "bin/printf-stdout";
let b_args = ["%s%s%s%s%s", "h", "e", "l", "l", "o"];
assert_program_args_stdout_eq!(&a_program, &a_args, &b_program, &b_args);

Modules§