mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
Merge pull request #8221 from willshuttleworth/stty-size
stty: add options to set and print terminal size
This commit is contained in:
commit
39c793c885
2 changed files with 119 additions and 1 deletions
|
@ -48,6 +48,14 @@ fn all_and_setting() {
|
|||
.stderr_contains("when specifying an output style, modes may not be set");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_and_print_setting() {
|
||||
new_ucmd!()
|
||||
.args(&["--all", "size"])
|
||||
.fails()
|
||||
.stderr_contains("when specifying an output style, modes may not be set");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn save_and_all() {
|
||||
new_ucmd!()
|
||||
|
@ -201,3 +209,37 @@ fn set_mapping() {
|
|||
.succeeds()
|
||||
.stdout_contains("intr = ^C");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn row_column_sizes() {
|
||||
new_ucmd!()
|
||||
.args(&["rows", "-1"])
|
||||
.fails()
|
||||
.stderr_contains("invalid integer argument: '-1'");
|
||||
|
||||
new_ucmd!()
|
||||
.args(&["columns", "-1"])
|
||||
.fails()
|
||||
.stderr_contains("invalid integer argument: '-1'");
|
||||
|
||||
// overflow the u32 used for row/col counts
|
||||
new_ucmd!()
|
||||
.args(&["cols", "4294967296"])
|
||||
.fails()
|
||||
.stderr_contains("invalid integer argument: '4294967296'");
|
||||
|
||||
new_ucmd!()
|
||||
.args(&["rows", ""])
|
||||
.fails()
|
||||
.stderr_contains("invalid integer argument: ''");
|
||||
|
||||
new_ucmd!()
|
||||
.args(&["columns"])
|
||||
.fails()
|
||||
.stderr_contains("missing argument to 'columns'");
|
||||
|
||||
new_ucmd!()
|
||||
.args(&["rows"])
|
||||
.fails()
|
||||
.stderr_contains("missing argument to 'rows'");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue