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

unexpand: handle too large "tabs" arguments

This commit is contained in:
Daniel Hofstetter 2022-06-12 16:07:23 +02:00 committed by Sylvestre Ledru
parent 75edeea5e4
commit cf605c24d0
2 changed files with 21 additions and 6 deletions

View file

@ -218,3 +218,11 @@ fn test_tabs_with_invalid_chars() {
.fails()
.stderr_contains("tab size contains invalid character(s): 'x2'");
}
#[test]
fn test_tabs_shortcut_with_too_large_size() {
let arg = format!("-{}", u128::MAX);
let expected_error = "tab stop value is too large";
new_ucmd!().arg(arg).fails().stderr_contains(expected_error);
}