summaryrefslogtreecommitdiffstats
path: root/test/option--U.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-08-05 03:41:27 (GMT)
committerSteven Knight <knight@baldmt.com>2002-08-05 03:41:27 (GMT)
commit711e5cdfe154688814d7f493cc2c832c79fd1014 (patch)
tree7ebb5f7d1e1924d165ca6573f988c9930e62a92d /test/option--U.py
parent8467314faf70040103f4110a9b67b4c4ed6659d3 (diff)
downloadSCons-711e5cdfe154688814d7f493cc2c832c79fd1014.zip
SCons-711e5cdfe154688814d7f493cc2c832c79fd1014.tar.gz
SCons-711e5cdfe154688814d7f493cc2c832c79fd1014.tar.bz2
Make -U be case insensitive on Win32 (Bug 589292) (Anthony Roach)
Diffstat (limited to 'test/option--U.py')
-rw-r--r--test/option--U.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/option--U.py b/test/option--U.py
index 013b81f..003bce1 100644
--- a/test/option--U.py
+++ b/test/option--U.py
@@ -24,6 +24,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+import os
import os.path
import sys
@@ -43,10 +44,10 @@ file.write(contents)
file.close()
""")
-test.write('SConstruct', """
+test.write('SConstruct', r"""
import SCons.Defaults
env = Environment()
-env['BUILDERS']['B'] = Builder(action='%s build.py $TARGET $SOURCES', multi=1)
+env['BUILDERS']['B'] = Builder(action=r'%s build.py $TARGET $SOURCES', multi=1)
Default(env.B(target = 'sub1/foo.out', source = 'sub1/foo.in'))
Export('env')
SConscript('sub2/SConscript')
@@ -92,8 +93,13 @@ test.fail_test(os.path.exists(test.workpath('sub3', 'baz.out')))
test.fail_test(os.path.exists(test.workpath('bar.out')))
test.fail_test(os.path.exists(test.workpath('sub2/xxx.out')))
-test.write('SConscript', """assert GetLaunchDir() == r'%s'"""%test.workpath('sub2'))
-test.run(chdir = 'sub2', arguments = '-U')
+
+if sys.platform == 'win32':
+ test.write('SConscript', """assert GetLaunchDir() == r'%s'"""%test.workpath('SUB2'))
+ test.run(chdir = 'SUB2', arguments = '-U')
+else:
+ test.write('SConscript', """assert GetLaunchDir() == r'%s'"""%test.workpath('sub2'))
+ test.run(chdir = 'sub2', arguments = '-U')
test.fail_test(os.path.exists(test.workpath('sub1', 'foo.out')))
test.fail_test(not os.path.exists(test.workpath('sub2', 'bar.out')))
test.fail_test(not os.path.exists(test.workpath('sub2b', 'bar.out')))