[PATCH 2 of 2 STABLE] test-remove: adapt to differing error message on Windows

Adrian Buehlmann adrian at cadifra.com
Wed Oct 24 04:57:37 CDT 2012


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1351072284 -7200
# Branch stable
# Node ID e38104d1a22266a9375afc0fecc0a9bdbb4827a1
# Parent  6d8253f8d895d7aebcc8d1e210af283c8b1a9238
test-remove: adapt to differing error message on Windows

On Windows, this part of the test failed with

     $ hg rm --after nosuch
  -  nosuch: No such file or directory
  +  nosuch: The system cannot find the file specified
     [1]

Fixed by glob-ing away the error message if the test is run on Windows
(see for example test-bad-pull.t line 3 for precedent).

test-remove.t now passes on Windows.

diff --git a/tests/test-remove.t b/tests/test-remove.t
--- a/tests/test-remove.t
+++ b/tests/test-remove.t
@@ -276,6 +276,12 @@
   $ rm d1/a
   $ hg rm --after d1
   removing d1/a (glob)
+#if windows
+  $ hg rm --after nosuch
+  nosuch: * (glob)
+  [1]
+#else
   $ hg rm --after nosuch
   nosuch: No such file or directory
   [1]
+#endif


More information about the Mercurial-devel mailing list