mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 06:42:42 +00:00
Add check for terminal in test_valid_arg() function
This commit is contained in:
parent
1ce52903b0
commit
1a12ffaa79
1 changed files with 7 additions and 4 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue