Skip to content

Commit 0eab0fa

Browse files
authored
Merge pull request #7301 from jfinkels/split-test-format-width
split: avoid extremely long format width in test
2 parents aa39c2c + 183a99d commit 0eab0fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/by-util/test_split.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1977,9 +1977,9 @@ fn test_split_separator_same_multiple() {
19771977
#[test]
19781978
fn test_long_lines() {
19791979
let (at, mut ucmd) = at_and_ucmd!();
1980-
let line1 = format!("{:131070}\n", "");
1981-
let line2 = format!("{:1}\n", "");
1982-
let line3 = format!("{:131071}\n", "");
1980+
let line1 = [" ".repeat(131_070), String::from("\n")].concat();
1981+
let line2 = [" ", "\n"].concat();
1982+
let line3 = [" ".repeat(131_071), String::from("\n")].concat();
19831983
let infile = [line1, line2, line3].concat();
19841984
ucmd.args(&["-C", "131072"])
19851985
.pipe_in(infile)

0 commit comments

Comments
 (0)