test-extension: fix load path for Windows
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 09 Jun 2017 23:56:50 -0400
changeset 32757 d2acd99bbab3
parent 32756 0ddfe7951378
child 32758 cba4461aa0a0
test-extension: fix load path for Windows The previous code was trying to load the extension from /tmp/hgtests.xxx/..., but the actual path for tests is C:\Users\...\Temp\hgtests.xxx\... I assume that the former is an MSYS path that maps somewhere under C:\MinGW.
tests/test-extension.t
--- a/tests/test-extension.t	Sat Jun 10 00:11:54 2017 -0400
+++ b/tests/test-extension.t	Fri Jun 09 23:56:50 2017 -0400
@@ -1608,7 +1608,7 @@
   (compatibility will be dropped after Mercurial-4.6, update your code.) * (glob)
 
 Make sure a broken uisetup doesn't globally break hg:
-  $ cat > baduisetup.py <<EOF
+  $ cat > $TESTTMP/baduisetup.py <<EOF
   > from mercurial import (
   >     bdiff,
   >     extensions,
@@ -1622,7 +1622,7 @@
   > EOF
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
-  > baduisetup = $PWD/baduisetup.py
+  > baduisetup = $TESTTMP/baduisetup.py
   > EOF
 
 Even though the extension fails during uisetup, hg is still basically usable: