view tests/test-vfprintf-posix.sh @ 11655:ed090c498dd0

version-etc: fix regression * lib/version-etc.h (ATTRIBUTE_SENTINEL): Define for new enough gcc. (version_etc): Use it, to catch bugs with trailing NULL. * lib/version-etc.c (version_etc_arn): Delete unused argument. (version_etc_va): Fix logic bug. * modules/version-etc-tests: Add test. * tests/test-version-etc.c: New file. * tests/test-version-etc.sh: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Thu, 25 Jun 2009 12:13:35 -0600
parents b6ae7b58fba1
children
line wrap: on
line source

#!/bin/sh

tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15

tmpfiles="$tmpfiles t-vfprintf-posix.tmp t-vfprintf-posix.out"
./test-vfprintf-posix${EXEEXT} > t-vfprintf-posix.tmp || exit 1
LC_ALL=C tr -d '\r' < t-vfprintf-posix.tmp > t-vfprintf-posix.out || exit 1

: ${DIFF=diff}
${DIFF} "${srcdir}/test-printf-posix.output" t-vfprintf-posix.out
result=$?

rm -fr $tmpfiles

exit $result