summaryrefslogtreecommitdiffstats
path: root/runtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'runtest.py')
-rw-r--r--runtest.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtest.py b/runtest.py
index fd421ef..9a0cadd 100644
--- a/runtest.py
+++ b/runtest.py
@@ -354,8 +354,15 @@ class Unbuffered:
sys.stdout = Unbuffered(sys.stdout)
+_ws = re.compile('\s')
+
+def escape(s):
+ if _ws.search(s):
+ s = '"' + s + '"'
+ return s
+
for t in tests:
- cmd = string.join([python, debug, t.abspath], " ")
+ cmd = string.join(map(escape, [python, debug, t.abspath]), " ")
if printcmd:
sys.stdout.write(cmd + "\n")
s = os.system(cmd)