[Updated] D10299: tests: handle Windows file separator differences in test-config.t

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Thu Apr 8 18:17:12 UTC 2021


Closed by commit rHG915a60bf3cb6: tests: handle Windows file separator differences in test-config.t (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D10299?vs=26646&id=26716

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D10299/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D10299

AFFECTED FILES
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -1,3 +1,17 @@
+Windows needs ';' as a file separator in an environment variable, and MSYS
+doesn't automatically convert it in every case.
+
+#if windows
+  $ path_list_var() {
+  >     echo $1 | sed 's/:/;/'
+  > }
+#else
+  $ path_list_var() {
+  >     echo $1
+  > }
+#endif
+
+
 hide outer repo
   $ hg init
 
@@ -446,7 +460,7 @@
 
 If file B is read after file A, value from B overwrite value from A.
 
-  $ HGRCPATH="file-A.rc:file-B.rc" hg config config-test.basic
+  $ HGRCPATH=`path_list_var "file-A.rc:file-B.rc"` hg config config-test.basic
   value-B
 
 Ordering from include
@@ -462,7 +476,7 @@
 command line override
 ---------------------
 
-  $ HGRCPATH="file-A.rc:file-B.rc" hg config config-test.basic --config config-test.basic=value-CLI
+  $ HGRCPATH=`path_list_var "file-A.rc:file-B.rc"` hg config config-test.basic --config config-test.basic=value-CLI
   value-CLI
 
 Alias ordering
@@ -480,7 +494,7 @@
   value-A
   $ HGRCPATH="file-B.rc" hg log -r .
   value-B
-  $ HGRCPATH="file-A.rc:file-B.rc" hg log -r .
+  $ HGRCPATH=`path_list_var "file-A.rc:file-B.rc"` hg log -r .
   value-B
 
 Alias and include
@@ -497,5 +511,5 @@
 command line override
 ---------------------
 
-  $ HGRCPATH="file-A.rc:file-B.rc" hg log -r . --config ui.logtemplate="value-CLI\n"
+  $ HGRCPATH=`path_list_var "file-A.rc:file-B.rc"` hg log -r . --config ui.logtemplate="value-CLI\n"
   value-CLI



To: mharbison72, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210408/4e5ff2c7/attachment-0002.html>


More information about the Mercurial-patches mailing list