# HG changeset patch # User Mads Kiilerich # Date 2012-01-27 02:00:03 # Node ID 2a1d97630f7f30c38b96bdf579d20f3d4de7e58a # Parent 10c8110d114b3288cfc610ce4c2879c7ada1a508 tests: don't use alias alias doesn't work in Solaris sh. diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -71,6 +71,7 @@ testpats = [ (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 [] diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t --- a/tests/test-phases-exchange.t +++ b/tests/test-phases-exchange.t @@ -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" diff --git a/tests/test-phases.t b/tests/test-phases.t --- a/tests/test-phases.t +++ b/tests/test-phases.t @@ -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"