1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-16 03:36:18 +00:00

Merge pull request #3594 from cakebaker/handle_too_large_tab_stop

expand: handle too large tab size
This commit is contained in:
Sylvestre Ledru 2022-06-06 13:39:19 +02:00 committed by GitHub
commit fc5aedfbb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);
}