summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-01-27 06:35:04 (GMT)
committerSteven Knight <knight@baldmt.com>2004-01-27 06:35:04 (GMT)
commitd0b4699180b7177561f452b646b85ec39f09d0e2 (patch)
treefaf09e444cbecbeafdc012c1e686a394c6eb156c /test
parenta478cc2fd257e58173fed2f3d00a2b0948a64fcf (diff)
downloadSCons-d0b4699180b7177561f452b646b85ec39f09d0e2.zip
SCons-d0b4699180b7177561f452b646b85ec39f09d0e2.tar.gz
SCons-d0b4699180b7177561f452b646b85ec39f09d0e2.tar.bz2
Accomodate white space in path names when running tests.
Diffstat (limited to 'test')
-rw-r--r--test/SConstruct.py2
-rw-r--r--test/option-f.py2
-rw-r--r--test/scan-once.py12
3 files changed, 12 insertions, 4 deletions
diff --git a/test/SConstruct.py b/test/SConstruct.py
index cd201d2..a3ad3aa 100644
--- a/test/SConstruct.py
+++ b/test/SConstruct.py
@@ -34,7 +34,7 @@ test.run(arguments = ".",
stdout = "",
stderr = r"""
scons: \*\*\* No SConstruct file found.
-File "\S+", line \d+, in \S+
+File "[^"]+", line \d+, in \S+
""")
test.match_func = TestCmd.match_exact
diff --git a/test/option-f.py b/test/option-f.py
index 3c8dcee..06afece 100644
--- a/test/option-f.py
+++ b/test/option-f.py
@@ -89,7 +89,7 @@ test.run(arguments = '-f no_such_file .',
stderr = None)
test.fail_test(not test.match_re(test.stderr(), """
scons: warning: Ignoring missing SConscript 'no_such_file'
-File "\S+", line \d+, in .*
+File "[^"]+", line \d+, in .*
"""))
test.pass_test()
diff --git a/test/scan-once.py b/test/scan-once.py
index cf08f5e..cfc4a25 100644
--- a/test/scan-once.py
+++ b/test/scan-once.py
@@ -337,8 +337,16 @@ Mylib.ExportLib(env, lib_fullname)
#cmd_generated = "cd %s ; sh MAKE-HEADER.sh" % Dir(".")
#cmd_justlib = "cd %s ; make" % Dir(".")
-cmd_generated = "%s $SOURCE" % (sys.executable,)
-cmd_justlib = "%s %s -C ${SOURCES[0].dir}" % (sys.executable, sys.argv[0])
+_ws = re.compile('\s')
+
+def escape(s):
+ if _ws.search(s):
+ s = '"' + s + '"'
+ return s
+
+cmd_generated = "%s $SOURCE" % (escape(sys.executable),)
+cmd_justlib = "%s %s -C ${SOURCES[0].dir}" % ((sys.executable),
+ escape(sys.argv[0]))
##### Deps appear correct ... but wacky scanning?
# Why?