mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-18 00:36:49 -04:00
Fix test.sh output on solaris
Solaris echo -n doesn't omit newlines, but printf omits newlines in more places.
This commit is contained in:
parent
c1260b0e7c
commit
b4f89b608a
16
test/test.sh
16
test/test.sh
@ -7,12 +7,18 @@ then
|
|||||||
TEST_OUTPUT_FILE=/dev/null
|
TEST_OUTPUT_FILE=/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# /bin/echo is a little more likely to support -n than sh's builtin echo.
|
# /bin/echo is a little more likely to support -n than sh's builtin echo,
|
||||||
if test -x /bin/echo
|
# printf is even more likely
|
||||||
|
if test "`printf hello 2>&1`" = "hello"
|
||||||
then
|
then
|
||||||
ECHO=/bin/echo
|
ECHO_N="printf"
|
||||||
else
|
else
|
||||||
ECHO=echo
|
if test -x /bin/echo
|
||||||
|
then
|
||||||
|
ECHO_N="/bin/echo -n"
|
||||||
|
else
|
||||||
|
ECHO_N="echo -n"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$TEST_OUTPUT_FILE" != "/dev/null"
|
if test "$TEST_OUTPUT_FILE" != "/dev/null"
|
||||||
@ -45,7 +51,7 @@ announce () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
announce_n () {
|
announce_n () {
|
||||||
$ECHO -n "$@"
|
$ECHO_N "$@"
|
||||||
echo "$@" >>"$TEST_OUTPUT_FILE"
|
echo "$@" >>"$TEST_OUTPUT_FILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user