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

timeless timeless at mozdev.org
Mon Feb 15 00:48:28 EST 2016


# 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]
 
 #if unix-permissions no-root
 
-Inaccessible source
+Inaccessible destination
 
   $ mkdir a
   $ chmod 000 a
-  $ hg clone a b
-  abort: repository a not found!
-  [255]
-
-Inaccessible destination
-
   $ hg init b
   $ cd b
   $ hg clone . ../a


More information about the Mercurial-devel mailing list