# HG changeset patch # User Martijn Pieters # Date 1542798801 0 # Node ID 18ed2a237ab55f56c8819c41ce86577b33c9ac7d # Parent a4a35fb44af301dda466767040a5d4b22141edef 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 diff -r a4a35fb44af3 -r 18ed2a237ab5 tests/test-discovery-obshashrange-cache.t --- 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" diff -r a4a35fb44af3 -r 18ed2a237ab5 tests/test-evolve-stop-orphan.t --- 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