Add check for terminal in test_valid_arg() function

This commit is contained in:
Ideflop 2023-05-18 09:18:33 +02:00
parent 1ce52903b0
commit 1a12ffaa79

View file

@ -12,11 +12,14 @@ fn test_more_no_arg() {
#[test]
fn test_valid_arg() {
new_ucmd!().arg("-c").succeeds().code_is(0);
new_ucmd!().arg("--print-over").succeeds().code_is(0);
if std::io::stdout().is_terminal() {
new_ucmd!().arg("-c").succeeds().code_is(0);
new_ucmd!().arg("--print-over").succeeds().code_is(0);
new_ucmd!().arg("-p").succeeds().code_is(0);
new_ucmd!().arg("--clean-print").succeeds().code_is(0);
new_ucmd!().arg("-p").succeeds().code_is(0);
new_ucmd!().arg("--clean-print").succeeds().code_is(0);
} else {
}
}
#[test]