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

bug(fmt): just like the GNU version, fails when -W is bigger than 2500

Closes: #1704
This commit is contained in:
Sylvestre Ledru 2021-01-24 22:41:05 +01:00 committed by Sylvestre Ledru
parent 992c113f09
commit cacaf0cde8
2 changed files with 21 additions and 0 deletions

View file

@ -20,6 +20,19 @@ fn test_fmt_q() {
);
}
#[test]
fn test_fmt_w_too_big() {
let result = new_ucmd!()
.arg("-w")
.arg("2501")
.arg("one-word-per-line.txt")
.run();
//.stdout_is_fixture("call_graph.expected");
assert_eq!(
result.stderr.trim(),
"fmt: error: invalid width: '2501': Numerical result out of range"
);
}
/* #[test]
Fails for now, see https://github.com/uutils/coreutils/issues/1501
fn test_fmt_w() {