[PATCH 1 of 4 V2] test-https: properly conditionalize Windows vs non-Windows output

Matt Harbison mharbison72 at gmail.com
Wed Jul 19 02:16:47 UTC 2017


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1500421791 14400
#      Tue Jul 18 19:49:51 2017 -0400
# Node ID 51f4e9087c4cb755338c564dba33f188e66663d1
# Parent  9a944e908ecf9ac3aabf30a24406513370eeebe7
test-https: properly conditionalize Windows vs non-Windows output

There's a bug in the (feature !) annotation, and this needs to be resolved
before fixing it.  Once fixed, the glob '*/missing' will match the output
'/missing' on non-Windows platforms, consuming the output line and leaving
nothing for the no-windows required line.

I probably should have made (foo !) match only the 'foo' feature, and be ignored
otherwise instead of optional.  (re) didn't work here, because the parenthesis
need to be escaped too.

diff --git a/tests/test-https.t b/tests/test-https.t
--- a/tests/test-https.t
+++ b/tests/test-https.t
@@ -605,14 +605,12 @@
 
   $ hg serve -p $HGPORT --certificate=/missing/certificate \
   > --config devel.servercafile=$PRIV --config devel.serverrequirecert=true
-  abort: referenced certificate file (*/missing/certificate) does not exist (glob) (windows !)
-  abort: referenced certificate file (/missing/certificate) does not exist (no-windows !)
+  abort: referenced certificate file (*/missing/certificate) does not exist (glob)
   [255]
 
   $ hg serve -p $HGPORT --certificate=$PRIV \
   > --config devel.servercafile=/missing/cafile --config devel.serverrequirecert=true
-  abort: referenced certificate file (*/missing/cafile) does not exist (glob) (windows !)
-  abort: referenced certificate file (/missing/cafile) does not exist (no-windows !)
+  abort: referenced certificate file (*/missing/cafile) does not exist (glob)
   [255]
 
 Start hgweb that requires client certificates:
@@ -657,14 +655,12 @@
 Missing certficate and key files result in error
 
   $ hg id https://localhost:$HGPORT/ --config auth.l.cert=/missing/cert
-  abort: certificate file (*/missing/cert) does not exist; cannot connect to localhost (glob) (windows !)
-  abort: certificate file (/missing/cert) does not exist; cannot connect to localhost (no-windows !)
+  abort: certificate file (*/missing/cert) does not exist; cannot connect to localhost (glob)
   (restore missing file or fix references in Mercurial config)
   [255]
 
   $ hg id https://localhost:$HGPORT/ --config auth.l.key=/missing/key
-  abort: certificate file (*/missing/key) does not exist; cannot connect to localhost (glob) (windows !)
-  abort: certificate file (/missing/key) does not exist; cannot connect to localhost (no-windows !)
+  abort: certificate file (*/missing/key) does not exist; cannot connect to localhost (glob)
   (restore missing file or fix references in Mercurial config)
   [255]
 


More information about the Mercurial-devel mailing list