diff options
| author | Steven Knight <knight@baldmt.com> | 2004-09-25 14:13:21 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2004-09-25 14:13:21 (GMT) |
| commit | e3ef329ae4a73b22e19b9c17816162db2c569911 (patch) | |
| tree | 985c831e543efa75d35407225e01aa91cf512e68 /src/engine/SCons/Node/FSTests.py | |
| parent | f5f2d8ad9d24df1b0f58477006b784adc4bc8a03 (diff) | |
| download | SCons-e3ef329ae4a73b22e19b9c17816162db2c569911.zip SCons-e3ef329ae4a73b22e19b9c17816162db2c569911.tar.gz SCons-e3ef329ae4a73b22e19b9c17816162db2c569911.tar.bz2 | |
Add a --debug=findlibs option. (Gary Oberbrunner)
Diffstat (limited to 'src/engine/SCons/Node/FSTests.py')
| -rw-r--r-- | src/engine/SCons/Node/FSTests.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py index 6bee431..4501cf1 100644 --- a/src/engine/SCons/Node/FSTests.py +++ b/src/engine/SCons/Node/FSTests.py @@ -1368,6 +1368,29 @@ class find_fileTestCase(unittest.TestCase): assert os.path.normpath('./bar/baz') in file_names, file_names assert os.path.normpath('./pseudo') in file_names, file_names + import StringIO + save_sys_stdout = sys.stdout + + try: + sio = StringIO.StringIO() + sys.stdout = sio + SCons.Node.FS.find_file('foo', paths, fs.File, verbose="xyz") + expect = " xyz: looking for 'foo' in '.' ...\n" + \ + " xyz: ... FOUND 'foo' in '.'\n" + c = sio.getvalue() + assert c == expect, c + + sio = StringIO.StringIO() + sys.stdout = sio + SCons.Node.FS.find_file('baz', paths, fs.File, verbose=1) + expect = " find_file: looking for 'baz' in '.' ...\n" + \ + " find_file: looking for 'baz' in 'bar' ...\n" + \ + " find_file: ... FOUND 'baz' in 'bar'\n" + c = sio.getvalue() + assert c == expect, c + finally: + sys.stdout = save_sys_stdout + class StringDirTestCase(unittest.TestCase): def runTest(self): """Test using a string as the second argument of |
