tests/test-alias.t
changeset 16965 91284af53508
parent 16912 6ef3107c661e
child 17015 73d20de5f30b
--- a/tests/test-alias.t	Fri Jun 15 21:42:47 2012 +0200
+++ b/tests/test-alias.t	Sat Jun 16 21:57:42 2012 +0200
@@ -1,5 +1,3 @@
-  $ "$TESTDIR/hghave" system-sh || exit 80
-
   $ HGFOO=BAR; export HGFOO
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
@@ -26,14 +24,14 @@
   > dln = lognull --debug
   > nousage = rollback
   > put = export -r 0 -o "\$FOO/%R.diff"
-  > blank = !echo
-  > self = !echo '\$0'
-  > echo = !echo '\$@'
-  > echo1 = !echo '\$1'
-  > echo2 = !echo '\$2'
-  > echo13 = !echo '\$1' '\$3'
-  > count = !hg log -r '\$@' --template='.' | wc -c | sed -e 's/ //g'
-  > mcount = !hg log \$@ --template='.' | wc -c | sed -e 's/ //g'
+  > blank = !printf '\n'
+  > self = !printf '\$0\n'
+  > echoall = !printf '\$@\n'
+  > echo1 = !printf '\$1\n'
+  > echo2 = !printf '\$2\n'
+  > echo13 = !printf '\$1 \$3\n'
+  > count = !hg log -r "\$@" --template=. | wc -c | sed -e 's/ //g'
+  > mcount = !hg log \$@ --template=. | wc -c | sed -e 's/ //g'
   > rt = root
   > tglog = glog --template "{rev}:{node|short}: '{desc}' {branches}\n"
   > idalias = id
@@ -41,10 +39,10 @@
   > idaliasshell = !echo test
   > parentsshell1 = !echo one
   > parentsshell2 = !echo two
-  > escaped1 = !echo 'test\$\$test'
-  > escaped2 = !echo "HGFOO is \$\$HGFOO"
-  > escaped3 = !echo "\$1 is \$\$\$1"
-  > escaped4 = !echo '\$\$0' '\$\$@'
+  > escaped1 = !printf 'test\$\$test\n'
+  > escaped2 = !sh -c 'echo "HGFOO is \$\$HGFOO"'
+  > escaped3 = !sh -c 'echo "\$1 is \$\$\$1"'
+  > escaped4 = !printf '\$\$0 \$\$@\n'
   > 
   > [defaults]
   > mylog = -q
@@ -200,11 +198,11 @@
   
   $ hg self
   self
-  $ hg echo
+  $ hg echoall
   
-  $ hg echo foo
+  $ hg echoall foo
   foo
-  $ hg echo 'test $2' foo
+  $ hg echoall 'test $2' foo
   test $2 foo
   $ hg echo1 foo bar baz
   foo
@@ -270,7 +268,7 @@
   0
   $ hg --cwd .. count 'branch(default)'
   2
-  $ hg echo --cwd ..
+  $ hg echoall --cwd ..
   
 
 
@@ -278,11 +276,11 @@
 
   $ cat >> .hg/hgrc <<EOF
   > [alias]
-  > subalias = !echo sub \$@
+  > subalias = !echo sub
   > EOF
   $ cat >> ../.hg/hgrc <<EOF
   > [alias]
-  > mainalias = !echo main \$@
+  > mainalias = !echo main
   > EOF