I noticed that with /bin/sh on Mac OS X, "echo -n" does not work as
desired, (it actually prints "-n" rather than suppressing the final
newline). There is a /bin/echo that could be used (it actually works)
instead of the builtin echo.
But I decided it's more robust to just use printf rather than
hardcoding /bin/echo into the script.
echo "====== Testing for correctness ======"
for test in $testdir/*.c; do
- echo -n "Testing $test..."
+ printf "Testing $test..."
$glcpp $(test_specific_args $test) < $test > $test.out 2>&1
total=$((total+1))
if cmp $test.expected $test.out >/dev/null 2>&1; then
if [ "$do_valgrind" = "yes" ]; then
echo "====== Testing for valgrind cleanliness ======"
for test in $testdir/*.c; do
- echo -n "Testing $test with valgrind..."
+ printf "Testing $test with valgrind..."
valgrind --error-exitcode=31 --log-file=$test.valgrind-errors $glcpp $(test_specific_args $test) < $test >/dev/null 2>&1
if [ "$?" = "31" ]; then
echo "ERRORS"