Merge pull request #4707 from cakebaker/wc_improve_readability_of_tests

wc: use concat! to improve readability of tests
This commit is contained in:
Sylvestre Ledru 2023-04-04 20:00:19 +02:00 committed by GitHub
commit 90609044eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -475,9 +475,11 @@ fn test_total_auto() {
new_ucmd!()
.args(&["lorem_ipsum.txt", "moby_dick.txt", "--total=auto"])
.run()
.stdout_is(
" 13 109 772 lorem_ipsum.txt\n 18 204 1115 moby_dick.txt\n 31 313 1887 total\n",
);
.stdout_is(concat!(
" 13 109 772 lorem_ipsum.txt\n",
" 18 204 1115 moby_dick.txt\n",
" 31 313 1887 total\n",
));
}
#[test]
@ -485,14 +487,19 @@ fn test_total_always() {
new_ucmd!()
.args(&["lorem_ipsum.txt", "--total=always"])
.run()
.stdout_is(" 13 109 772 lorem_ipsum.txt\n 13 109 772 total\n");
.stdout_is(concat!(
" 13 109 772 lorem_ipsum.txt\n",
" 13 109 772 total\n",
));
new_ucmd!()
.args(&["lorem_ipsum.txt", "moby_dick.txt", "--total=always"])
.run()
.stdout_is(
" 13 109 772 lorem_ipsum.txt\n 18 204 1115 moby_dick.txt\n 31 313 1887 total\n",
);
.stdout_is(concat!(
" 13 109 772 lorem_ipsum.txt\n",
" 18 204 1115 moby_dick.txt\n",
" 31 313 1887 total\n",
));
}
#[test]
@ -505,7 +512,10 @@ fn test_total_never() {
new_ucmd!()
.args(&["lorem_ipsum.txt", "moby_dick.txt", "--total=never"])
.run()
.stdout_is(" 13 109 772 lorem_ipsum.txt\n 18 204 1115 moby_dick.txt\n");
.stdout_is(concat!(
" 13 109 772 lorem_ipsum.txt\n",
" 18 204 1115 moby_dick.txt\n",
));
}
#[test]