[PATCH 1 of 4 evolve-ext] tests: make tests work on Mac OS

Jordi GutiƩrrez Hermoso jordigh at octave.org
Fri Apr 3 13:28:52 CDT 2015


On Thu, 2015-04-02 at 19:09 -0700, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1428014651 25200
> #      Thu Apr 02 15:44:11 2015 -0700
> # Node ID 3a9143852da729fb8c0183ca5bbce2009ea02f8b
> # Parent  ffa32ca659f1eb26e0f67e68f698837766819c3f
> tests: make tests work on Mac OS
> 
> wc -m adds spacing before the results, we trim them to make the test pass on
> Mac OS.
[snip]
> -  $ wc -m .hg/store/obsinhibit
> +  $ wc -m .hg/store/obsinhibit | sed -e 's/^[ \t]*//'

The usual way to deal with slight variations in output is by globbing
or regexing on the output, e.g. from test-setdiscovery:

  $ hg heads -t --template . | wc -c
  \s*261 (re)




More information about the Mercurial-devel mailing list