Patchwork [1,of,2] tests: avoid test failure for mangling path-like string by MSYS

login
register
mail settings
Submitter Katsunori FUJIWARA
Date June 26, 2017, 8:21 p.m.
Message ID <c31f122d54b6904e1fb2.1498508501@speaknoevil>
Download mbox | patch
Permalink /patch/21750/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - June 26, 2017, 8:21 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1498497877 -32400
#      Tue Jun 27 02:24:37 2017 +0900
# Node ID c31f122d54b6904e1fb212c2e14b162fbb977153
# Parent  c41cbe98822c5cd5a9a776d47b90c25e2ee11063
tests: avoid test failure for mangling path-like string by MSYS
Yuya Nishihara - June 27, 2017, 12:52 p.m.
On Tue, 27 Jun 2017 05:21:41 +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> # Date 1498497877 -32400
> #      Tue Jun 27 02:24:37 2017 +0900
> # Node ID c31f122d54b6904e1fb212c2e14b162fbb977153
> # Parent  c41cbe98822c5cd5a9a776d47b90c25e2ee11063
> tests: avoid test failure for mangling path-like string by MSYS

Queued, thanks.

Patch

diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -131,7 +131,13 @@  Check hgweb's load order of extensions a
 
 (check that revset predicate foo() and bar() are available)
 
-  $ REQUEST_METHOD='GET' PATH_INFO='/shortlog' SCRIPT_NAME='' \
+#if msys
+  $ PATH_INFO='//shortlog'
+#else
+  $ PATH_INFO='/shortlog'
+#endif
+  $ export PATH_INFO
+  $ REQUEST_METHOD='GET' SCRIPT_NAME='' \
   >     QUERY_STRING='rev=foo() and bar()' \
   >     SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \
   >     | grep '<a href="/rev/[0-9a-z]*">'