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

expand: handle too large tab size

This commit is contained in:
Daniel Hofstetter 2022-06-05 13:49:11 +02:00
parent 69c2871336
commit c14ff14e99
2 changed files with 41 additions and 23 deletions

View file

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