changeset 16013:2a1d97630f7f stable

tests: don't use alias alias doesn't work in Solaris sh.
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 27 Jan 2012 03:00:03 +0100
parents 10c8110d114b
children f8955a7f82e6
files contrib/check-code.py tests/test-phases-exchange.t tests/test-phases.t
diffstat 3 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Fri Jan 27 02:59:59 2012 +0100
+++ b/contrib/check-code.py	Fri Jan 27 03:00:03 2012 +0100
@@ -71,6 +71,7 @@
     (r'[^>\n]>\s*\$HGRCPATH', "don't overwrite $HGRCPATH, append to it"),
     (r'^stop\(\)', "don't use 'stop' as a shell function name"),
     (r'(\[|\btest\b).*-e ', "don't use 'test -e', use 'test -f'"),
+    (r'^alias\b.*=', "don't use alias, use a function"),
   ],
   # warnings
   []
--- a/tests/test-phases-exchange.t	Fri Jan 27 02:59:59 2012 +0100
+++ b/tests/test-phases-exchange.t	Fri Jan 27 03:00:03 2012 +0100
@@ -2,7 +2,7 @@
   > [extensions]
   > graphlog=
   > EOF
-  $ alias hgph='hg log -G --template "{rev} {phase} {desc} - {node|short}\n"'
+  $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; }
 
   $ mkcommit() {
   >    echo "$1" > "$1"
--- a/tests/test-phases.t	Fri Jan 27 02:59:59 2012 +0100
+++ b/tests/test-phases.t	Fri Jan 27 03:00:03 2012 +0100
@@ -1,4 +1,4 @@
-  $ alias hglog='hg log --template "{rev} {phaseidx} {desc}\n"'
+  $ hglog() { hg log --template "{rev} {phaseidx} {desc}\n" $*; }
   $ mkcommit() {
   >    echo "$1" > "$1"
   >    hg add "$1"