[PATCH 4 of 4 v4] tests: change a clone test to work cross platform

Yuya Nishihara yuya at tcha.org
Mon Feb 15 09:26:54 EST 2016


On Sun, 14 Feb 2016 23:48:28 -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1454911205 0
> #      Mon Feb 08 06:00:05 2016 +0000
> # Node ID 27da457e162db0a3e9b43ce63b269a447afc0f7e
> # Parent  de492f4be4555250f293171c3ff52566d9e46892
> tests: change a clone test to work cross platform
> 
> While it is not easy to make a file 000 on Windows, you can
> emulate some of the behaviors by replacing an unreadable directory
> with /dev/null.
> 
> diff --git a/tests/test-clone.t b/tests/test-clone.t
> --- a/tests/test-clone.t
> +++ b/tests/test-clone.t
> @@ -582,19 +582,18 @@
>  #endif
>    $ rm -rf b # work around bug with http clone
>  
> +Inaccessible source
> +
> +  $ hg clone /dev/null b
> +  abort: repository /dev/null not found!
> +  [255]

/dev/null is translated to nul on MSYS, so the output differs.

Because the test explicitly states "inaccessible", and test-clone.t has more
tests for the other kind of IOError/OSError, I think this change has little
benefit.


More information about the Mercurial-devel mailing list