1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

stty: print special terminal information

This commit is contained in:
Terts Diepraam 2022-07-01 15:55:58 +02:00 committed by Sylvestre Ledru
parent cc147a7c8d
commit f861fc0854
3 changed files with 214 additions and 18 deletions

View file

@ -3,11 +3,13 @@
use crate::common::util::*;
#[test]
#[ignore = "Fails because cargo test does not run in a tty"]
fn runs() {
new_ucmd!().succeeds();
}
#[test]
#[ignore = "Fails because cargo test does not run in a tty"]
fn print_all() {
let res = new_ucmd!().succeeds();
@ -18,3 +20,36 @@ fn print_all() {
res.stdout_contains(flag);
}
}
#[test]
fn save_and_setting() {
new_ucmd!()
.args(&["--save", "nl0"])
.fails()
.stderr_contains("when specifying an output style, modes may not be set");
}
#[test]
fn all_and_setting() {
new_ucmd!()
.args(&["--all", "nl0"])
.fails()
.stderr_contains("when specifying an output style, modes may not be set");
}
#[test]
fn save_and_all() {
new_ucmd!()
.args(&["--save", "--all"])
.fails()
.stderr_contains(
"the options for verbose and stty-readable output styles are mutually exclusive",
);
new_ucmd!()
.args(&["--all", "--save"])
.fails()
.stderr_contains(
"the options for verbose and stty-readable output styles are mutually exclusive",
);
}