changeset 4267:18ed2a237ab5

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
author Martijn Pieters <mj@octobus.net>
date Wed, 21 Nov 2018 11:13:21 +0000
parents a4a35fb44af3
children d5a2cc19903f
files tests/test-discovery-obshashrange-cache.t tests/test-evolve-stop-orphan.t
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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