summaryrefslogtreecommitdiff
path: root/test/SWIG
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2009-01-08 16:40:36 +0000
committerSteven Knight <knight@baldmt.com>2009-01-08 16:40:36 +0000
commit535fee6392b7dd6874573592ba743f4cd0e211fe (patch)
tree30f3e59505971e2af3e8237581aca9e8435874c4 /test/SWIG
parent499330bd7eef24c11dfe33cbc5679923f95562a5 (diff)
downloadscons-535fee6392b7dd6874573592ba743f4cd0e211fe.tar.gz
Issue 2279: Support $SWIGOUTDIR values with spaces in the
directory name. (Arve Knudsen)
Diffstat (limited to 'test/SWIG')
-rw-r--r--test/SWIG/SWIGOUTDIR.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/SWIG/SWIGOUTDIR.py b/test/SWIG/SWIGOUTDIR.py
index e0f3f25e..a875e801 100644
--- a/test/SWIG/SWIGOUTDIR.py
+++ b/test/SWIG/SWIGOUTDIR.py
@@ -55,7 +55,7 @@ env = Environment(tools = ['default', 'swig'],
Java_foo_interface = env.SharedLibrary(
'Java_foo_interface',
'Java_foo_interface.i',
- SWIGOUTDIR = 'java/build',
+ SWIGOUTDIR = 'java/build dir',
SWIGFLAGS = '-c++ -java -Wall',
SWIGCXXFILESUFFIX = "_wrap.cpp")
""" % locals())
@@ -64,19 +64,24 @@ test.write('Java_foo_interface.i', """\
%module foopack
""")
-# SCons should realize that it needs to create the java/build
-# subdirectory to hold the generate .java files.
+# SCons should realize that it needs to create the "java/build dir"
+# subdirectory to hold the generated .java files.
test.run(arguments = '.')
+test.must_exist('java/build dir/foopackJNI.java')
+test.must_exist('java/build dir/foopack.java')
+
# SCons should remove the built .java files.
-test.run(arguments = '-c java/build/foopack.java java/build/foopackJNI.java')
+test.run(arguments = '-c')
-test.must_not_exist('java/build/foopackJNI.java')
-test.must_not_exist('java/build/foopack.java')
+test.must_not_exist('java/build dir/foopackJNI.java')
+test.must_not_exist('java/build dir/foopack.java')
# SCons should realize it needs to rebuild the removed .java files.
test.not_up_to_date(arguments = '.')
+test.must_exist('java/build dir/foopackJNI.java')
+test.must_exist('java/build dir/foopack.java')
test.pass_test()