tests: fix for POSIX compliance
* Mac ls will exit with a different message and exit code [1], replace with
grep (which is what mercurial tests do)
* POSIX echo has no -n switch, use printf instead
--- a/tests/test-discovery-obshashrange-cache.t Wed Nov 21 10:47:07 2018 +0000
+++ b/tests/test-discovery-obshashrange-cache.t Wed Nov 21 11:13:21 2018 +0000
@@ -28,7 +28,7 @@
$ hg -R main debugbuilddag '.+7'
$ for node in `hg -R main log -T '{node}\n'`; do
- > echo -n $node | grep -o . | sort |tr -d "\n" > ancfile
+ > printf $node | grep -o . | sort |tr -d "\n" > ancfile
> anc=`cat ancfile`
> rm ancfile
> echo "marking $anc as predecessors of $node"
--- a/tests/test-evolve-stop-orphan.t Wed Nov 21 10:47:07 2018 +0000
+++ b/tests/test-evolve-stop-orphan.t Wed Nov 21 11:13:21 2018 +0000
@@ -109,9 +109,8 @@
Checking working dir
$ hg status
Checking for incomplete mergestate
- $ ls .hg/merge
- ls: cannot access .?\.hg/merge.?: No such file or directory (re)
- [2]
+ $ ls .hg/ | grep merge
+ [1]
Checking graph
$ hg glog