summaryrefslogtreecommitdiffstats
path: root/test/ParseConfig.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-09-25 05:18:23 (GMT)
committerSteven Knight <knight@baldmt.com>2003-09-25 05:18:23 (GMT)
commit41a3eeec87272670f593f46ab8558d0ab99046f5 (patch)
tree99bf886e89cd998dd6a32bdeb6894f15243122ce /test/ParseConfig.py
parentfd20ba3535a82bc7a6749d0020b344f4957ebc5d (diff)
downloadSCons-41a3eeec87272670f593f46ab8558d0ab99046f5.zip
SCons-41a3eeec87272670f593f46ab8558d0ab99046f5.tar.gz
SCons-41a3eeec87272670f593f46ab8558d0ab99046f5.tar.bz2
Add more environment methods for global functions: Action(), Builder(), Environment(), Literal(), Platform(), Split(), Tool(). Deprecate ParseConfig() in favor of an environment method.
Diffstat (limited to 'test/ParseConfig.py')
-rw-r--r--test/ParseConfig.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/ParseConfig.py b/test/ParseConfig.py
index da9bad1..108aa31 100644
--- a/test/ParseConfig.py
+++ b/test/ParseConfig.py
@@ -40,7 +40,7 @@ print "-L/usr/fax -Lfoo -lxxx abc"
test.write('SConstruct', """
env = Environment(CPPPATH = [], LIBPATH = [], LIBS = [], CCFLAGS = '')
-static_libs = ParseConfig(env, [r"%s", r"%s", "--libs --cflags"])
+static_libs = env.ParseConfig([r"%s", r"%s", "--libs --cflags"])
print env['CPPPATH']
print env['LIBPATH']
print env['LIBS']
@@ -49,6 +49,17 @@ print static_libs
""" % (TestSCons.python, test_config))
test.write('SConstruct2', """
+env = Environment(CPPPATH = [], LIBPATH = [], LIBS = [], CCFLAGS = '',
+ PYTHON = '%s')
+static_libs = env.ParseConfig(r"$PYTHON %s --libs --cflags")
+print env['CPPPATH']
+print env['LIBPATH']
+print env['LIBS']
+print env['CCFLAGS']
+print static_libs
+""" % (TestSCons.python, test_config))
+
+test.write('SConstruct3', """
env = Environment(CPPPATH = [], LIBPATH = [], LIBS = [], CCFLAGS = '')
static_libs = ParseConfig(env, r"%s %s --libs --cflags")
print env['CPPPATH']
@@ -70,4 +81,12 @@ test.run(arguments = ".", stdout = good_stdout)
test.run(arguments = "-f SConstruct2 .", stdout = good_stdout)
+test.run(arguments = "-f SConstruct3 .",
+ stdout = good_stdout,
+ stderr = """
+scons: warning: The ParseConfig() function has been deprecated;
+ use the env.ParseConfig() method instead.
+File "SConstruct3", line 3, in ?
+""")
+
test.pass_test()