summaryrefslogtreecommitdiffstats
path: root/test/option--C.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-09-14 19:29:01 (GMT)
committerSteven Knight <knight@baldmt.com>2003-09-14 19:29:01 (GMT)
commit3ab7670a45179b7a09eabc219842f6c224ad35da (patch)
treeaca25fd119f68b44fa181a90bd535bfdfb01fed5 /test/option--C.py
parent1c2ac0f2ca0c14d1181add9cc66d9650fece1481 (diff)
downloadSCons-3ab7670a45179b7a09eabc219842f6c224ad35da.zip
SCons-3ab7670a45179b7a09eabc219842f6c224ad35da.tar.gz
SCons-3ab7670a45179b7a09eabc219842f6c224ad35da.tar.bz2
Make more Environment methods from global functions.
Diffstat (limited to 'test/option--C.py')
-rw-r--r--test/option--C.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/option--C.py b/test/option--C.py
index c889602..0a11688 100644
--- a/test/option--C.py
+++ b/test/option--C.py
@@ -47,6 +47,7 @@ test = TestSCons.TestSCons(match=match_normcase)
wpath = test.workpath()
wpath_sub = test.workpath('sub')
wpath_sub_dir = test.workpath('sub', 'dir')
+wpath_sub_foo_bar = test.workpath('sub', 'foo', 'bar')
test.subdir('sub', ['sub', 'dir'])
@@ -62,7 +63,8 @@ print GetBuildPath('..')
test.write(['sub', 'dir', 'SConstruct'], """
import os
-print GetBuildPath('..')
+env = Environment(FOO='foo', BAR='bar')
+print env.GetBuildPath('../$FOO/$BAR')
""")
test.run(arguments = '-C sub .',
@@ -70,7 +72,7 @@ test.run(arguments = '-C sub .',
build_str = "scons: `.' is up to date.\n"))
test.run(arguments = '-C sub -C dir .',
- stdout = test.wrap_stdout(read_str = '%s\n' % wpath_sub,
+ stdout = test.wrap_stdout(read_str = '%s\n' % wpath_sub_foo_bar,
build_str = "scons: `.' is up to date.\n"))
test.run(arguments = ".",
@@ -78,7 +80,7 @@ test.run(arguments = ".",
build_str = "scons: `.' is up to date.\n"))
test.run(arguments = '--directory=sub/dir .',
- stdout = test.wrap_stdout(read_str = '%s\n' % wpath_sub,
+ stdout = test.wrap_stdout(read_str = '%s\n' % wpath_sub_foo_bar,
build_str = "scons: `.' is up to date.\n"))
test.run(arguments = '-C %s -C %s .' % (wpath_sub_dir, wpath_sub),
@@ -86,4 +88,3 @@ test.run(arguments = '-C %s -C %s .' % (wpath_sub_dir, wpath_sub),
build_str = "scons: `.' is up to date.\n"))
test.pass_test()
-