2021-02-23 09:21:01 +00:00
|
|
|
use crate::common::util::*;
|
|
|
|
|
|
|
|
// FIXME: this depends on the system having true and false in PATH
|
|
|
|
// the best solution is probably to generate some test binaries that we can call for any
|
|
|
|
// utility that requires executing another program (kill, for instance)
|
|
|
|
#[test]
|
2021-05-30 05:10:54 +00:00
|
|
|
fn test_subcommand_return_code() {
|
2021-03-13 22:30:32 +00:00
|
|
|
new_ucmd!().arg("1").arg("true").succeeds();
|
2021-02-23 09:21:01 +00:00
|
|
|
|
2021-03-13 22:30:32 +00:00
|
|
|
new_ucmd!().arg("1").arg("false").run().status_code(1);
|
2021-02-23 09:21:01 +00:00
|
|
|
}
|