[PATCH 2 of 2] test-annotate: conditionalize error output for Windows

Matt Harbison mharbison72 at gmail.com
Sun Mar 29 11:44:04 CDT 2015


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1427602856 14400
#      Sun Mar 29 00:20:56 2015 -0400
# Node ID e1887f9cbd9a3154f9833f30345e1ab3b30cce45
# Parent  7d0c815d90d12c4d4de5485e9d91f0775f89a3f7
test-annotate: conditionalize error output for Windows

It seems better to leave the actual output in place instead of globbing
everything but 'abort:', in case it starts aborting for other reasons.

It isn't clear the purpose for reversing the file name position, but that
originates in windows.posixfile.

diff --git a/tests/test-annotate.t b/tests/test-annotate.t
--- a/tests/test-annotate.t
+++ b/tests/test-annotate.t
@@ -457,16 +457,28 @@
 annotate missing file
 
   $ rm baz
+#if windows
+  $ hg annotate -ncr "wdir()" baz
+  abort: $TESTTMP\repo\baz: The system cannot find the file specified
+  [255]
+#else
   $ hg annotate -ncr "wdir()" baz
   abort: No such file or directory: $TESTTMP/repo/baz
   [255]
+#endif
 
 annotate removed file
 
   $ hg rm baz
+#if windows
+  $ hg annotate -ncr "wdir()" baz
+  abort: $TESTTMP\repo\baz: The system cannot find the file specified
+  [255]
+#else
   $ hg annotate -ncr "wdir()" baz
   abort: No such file or directory: $TESTTMP/repo/baz
   [255]
+#endif
 
 Test annotate with whitespace options
 


More information about the Mercurial-devel mailing list