tests: head: set READ_BUFSIZE to BUFSIZ as done in src/head.c

* src/getlimits.c (main): Print the value of BUFSIZ.
* tests/head/head-elide-tail.pl ($limits): Save the results of
getlimits.
($READ_BUFSIZE): Set it to the value of BUFSIZ.
This commit is contained in:
Collin Funk committed 2026-11-16 15:41:56 -08:00
1 parent 2b0f8f9d82
commit ecb3396381
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -203,6 +203,7 @@ main (int argc, char **argv)
/* Other useful constants */
printf ("SIGRTMIN=%jd\n", (intmax_t) {SIGRTMIN});
printf ("SIGRTMAX=%jd\n", (intmax_t) {SIGRTMAX});
printf ("BUFSIZ=%ju\n", (uintmax_t) {BUFSIZ});
printf ("IO_BUFSIZE=%ju\n", (uintmax_t) {IO_BUFSIZE});
/* Errnos */
+2 -1
View File
@@ -26,7 +26,8 @@ $ENV{PROG} = 'head';
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
# This should match the definition in head.c.
my $READ_BUFSIZE = 8192;
my $limits = getlimits ();
my $READ_BUFSIZE = $limits->{BUFSIZ};
my @Tests =
(