mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-22 21:37:58 +02:00
29 lines
599 B
Plaintext
29 lines
599 B
Plaintext
# test here documents for sizes > 65536 (max pipe capacity I've seen),
|
|
# 4096 < size < 65536 (for smaller pipe capacities)
|
|
# 512 < size < 4096 (PIPE_BUF)
|
|
#
|
|
# There are tests in other scripts for here documents shorter than 512 bytes
|
|
#
|
|
# This should return the same results regardless of the pipe capacity
|
|
|
|
: ${TMPDIR:=/tmp}
|
|
FILENAME=${TMPDIR}/catfile-$$
|
|
|
|
catfile()
|
|
{
|
|
cat <<- EOF > $FILENAME
|
|
$(cat $1)
|
|
EOF
|
|
cmp $FILENAME $1
|
|
rm -f $FILENAME
|
|
}
|
|
|
|
|
|
if [ -f $BUILD_DIR/y.tab.c ]; then
|
|
catfile $BUILD_DIR/y.tab.c
|
|
else
|
|
catfile ../y.tab.c
|
|
fi
|
|
catfile ${BUILD_DIR}/config.h
|
|
catfile ${BUILD_DIR}/version.h
|