1
0
mirror of https://git.savannah.gnu.org/git/coreutils.git synced 2026-10-24 02:08:57 +03:00

tests: wc: simplify construction of the input file

* tests/wc/page-size.sh: Prefer 'truncate' redirecting 'head /dev/zero'.
Suggested by Andreas Schwab.
This commit is contained in:
Collin Funk
2026-10-08 17:47:15 -07:00
parent 19ebb3e1a7
commit c2dd4d5d34

View File

@@ -23,7 +23,7 @@ print_ver_ wc
page_size=$(getconf PAGESIZE || echo 4096)
for multiple in $(seq 3); do
head -c $page_size /dev/zero >> file || framework_failure_
truncate -s +$page_size file || framework_failure_
# Count the entire file as a sanity check.
wc -c < file > out 2> err || fail=1
file_size=$(($multiple * $page_size))