Mercurial > hg
comparison tests/run-tests @ 1952:f4df34b6987f
tests: fix portability issue for echo -n
author | TK Soh <teekaysoh@yahoo.com> |
---|---|
date | Tue, 14 Mar 2006 21:42:32 -0800 |
parents | 696230e52e4d |
children | 3bdd3bf17cfa |
comparison
equal
deleted
inserted
replaced
1951:696230e52e4d | 1952:f4df34b6987f |
---|---|
18 HGEDITOR=true; export HGEDITOR | 18 HGEDITOR=true; export HGEDITOR |
19 HGMERGE=true; export HGMERGE | 19 HGMERGE=true; export HGMERGE |
20 HGUSER="test"; export HGUSER | 20 HGUSER="test"; export HGUSER |
21 HGRCPATH=""; export HGRCPATH | 21 HGRCPATH=""; export HGRCPATH |
22 | 22 |
23 ECHO_N="echo -n" | 23 if [ `echo -n HG` == "-n HG" ] |
24 [ -x /usr/ucb/echo ] && ECHO_N="/usr/ucb/echo -n" | 24 then |
25 ECHO_N=echo | |
26 NNL="\c" | |
27 else | |
28 ECHO_N="echo -n" | |
29 NNL= | |
30 fi | |
25 | 31 |
26 umask 022 | 32 umask 022 |
27 | 33 |
28 tests=0 | 34 tests=0 |
29 failed=0 | 35 failed=0 |
137 if [ -z "$TESTS" ] ; then | 143 if [ -z "$TESTS" ] ; then |
138 TESTS=`ls test-* | grep -v "[.~]"` | 144 TESTS=`ls test-* | grep -v "[.~]"` |
139 fi | 145 fi |
140 | 146 |
141 for f in $TESTS ; do | 147 for f in $TESTS ; do |
142 $ECHO_N "." | 148 $ECHO_N ".${NNL}" |
143 run_one $f || failed=`expr $failed + 1` | 149 run_one $f || failed=`expr $failed + 1` |
144 tests=`expr $tests + 1` | 150 tests=`expr $tests + 1` |
145 done | 151 done |
146 | 152 |
147 echo | 153 echo |