tests: choose the path separator in PYTHONPATH suitable for platform
Before this patch, test code introduced by e3a5922e18c3 into
test-extension.t always uses ":" as the path separator in PYTHONPATH.
But ";" should be used on Windows.
This patch chooses the path separator in PYTHONPATH suitable for
platform.
--- a/tests/test-extension.t Fri Nov 08 12:35:50 2013 +0100
+++ b/tests/test-extension.t Sun Nov 10 16:48:24 2013 +0900
@@ -131,6 +131,13 @@
Check "from __future__ import absolute_import" support for external libraries
+#if windows
+ $ PATHSEP=";"
+#else
+ $ PATHSEP=":"
+#endif
+ $ export PATHSEP
+
$ mkdir $TESTTMP/libroot
$ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py
$ mkdir $TESTTMP/libroot/mod
@@ -148,7 +155,7 @@
> def extsetup():
> print 'ambigabs.s=%s' % ambigabs.s
> EOF
- $ (PYTHONPATH=$PYTHONPATH:$TESTTMP/libroot; hg --config extensions.loadabs=loadabs.py root)
+ $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root)
ambigabs.s=libroot/ambig.py
$TESTTMP/a
#endif
@@ -163,7 +170,7 @@
> def extsetup():
> print 'ambigrel.s=%s' % ambigrel.s
> EOF
- $ (PYTHONPATH=$PYTHONPATH:$TESTTMP/libroot; hg --config extensions.loadrel=loadrel.py root)
+ $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root)
ambigrel.s=libroot/mod/ambig.py
$TESTTMP/a
#endif