diff options
author | Steven Knight <knight@baldmt.com> | 2008-12-20 16:23:36 +0000 |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2008-12-20 16:23:36 +0000 |
commit | 71c54f6a12dae9c5494827e54259a3e34237813b (patch) | |
tree | 0d22552936968f8ef0f890a511a9b82ca3728ad4 /test/Deprecated/Options/PackageOption.py | |
parent | 9006aefb25baa8dc13b6427ac7a9e143c56a884e (diff) | |
download | scons-71c54f6a12dae9c5494827e54259a3e34237813b.tar.gz |
Add warnings for use of the (already) deprecated Options object
and its related functions.
Diffstat (limited to 'test/Deprecated/Options/PackageOption.py')
-rw-r--r-- | test/Deprecated/Options/PackageOption.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/test/Deprecated/Options/PackageOption.py b/test/Deprecated/Options/PackageOption.py index b7dbc710..11b8df0d 100644 --- a/test/Deprecated/Options/PackageOption.py +++ b/test/Deprecated/Options/PackageOption.py @@ -39,7 +39,7 @@ except NameError: import TestSCons -test = TestSCons.TestSCons() +test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) SConstruct_path = test.workpath('SConstruct') @@ -70,21 +70,27 @@ print env['x11'] Default(env.Alias('dummy', None)) """) -test.run() +warnings = """ +scons: warning: The Options class is deprecated; use the Variables class instead. +%s +scons: warning: The PackageOption\\(\\) function is deprecated; use the PackageVariable\\(\\) function instead. +%s""" % (TestSCons.file_expr, TestSCons.file_expr) + +test.run(stderr=warnings) check([str(True)]) -test.run(arguments='x11=no') +test.run(arguments='x11=no', stderr=warnings) check([str(False)]) -test.run(arguments='x11=0') +test.run(arguments='x11=0', stderr=warnings) check([str(False)]) -test.run(arguments=['x11=%s' % test.workpath()]) +test.run(arguments=['x11=%s' % test.workpath()], stderr=warnings) check([test.workpath()]) -expect_stderr = """ -scons: *** Path does not exist for option x11: /non/existing/path/ -""" + test.python_file_line(SConstruct_path, 14) +expect_stderr = warnings + """ +scons: \\*\\*\\* Path does not exist for option x11: /non/existing/path/ +""" + TestSCons.file_expr test.run(arguments='x11=/non/existing/path/', stderr=expect_stderr, status=2) |