]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Use 'printf' (POSIX issue 4) instead of 'echo -n', for portability.
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 12 Jul 2011 15:35:46 +0000 (15:35 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 12 Jul 2011 15:35:46 +0000 (15:35 +0000)
commit1344d03e6b2a33e63d83880acce65683f1fe93b1
tree85305b33640d521ea1463f84853719d2a3416ac0
parent4a19bd7e74593a1d3c4e26574a348f497578399d
Use 'printf' (POSIX issue 4) instead of 'echo -n', for portability.

The problem with using 'echo -n' is that it is not portable.  While BSD systems
required that the '-n' option be removed and interpreted, System V required
that all strings should be echoed with no interpretation of options.  This
fundamental difference of behavior means that it is never possible to use the
'-n' flag to echo in tests which are meant to be portable.

In this case, on Mac OS X 10.6, the /bin/sh shell builtin 'echo' uses the
System V semantics of the command, and thus the SHELL test failed on that
platform.

http://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html#tag_04_41_16

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@327793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
tests/test_substitution.c