diff options
author | Steven Knight <knight@baldmt.com> | 2004-09-26 06:12:36 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-09-26 06:12:36 (GMT) |
commit | 3b0b62cb7fa049ae5d87268f4d2e6a8832166d9e (patch) | |
tree | 933957ff679497cef5c97cacacf2b6a461355e29 /src/engine/SCons/BuilderTests.py | |
parent | 07d2524f1b230ffc11d43d3261418a767803e198 (diff) | |
download | SCons-3b0b62cb7fa049ae5d87268f4d2e6a8832166d9e.zip SCons-3b0b62cb7fa049ae5d87268f4d2e6a8832166d9e.tar.gz SCons-3b0b62cb7fa049ae5d87268f4d2e6a8832166d9e.tar.bz2 |
More robust Scanner comparisons. (Kevin Quick)
Diffstat (limited to 'src/engine/SCons/BuilderTests.py')
-rw-r--r-- | src/engine/SCons/BuilderTests.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/engine/SCons/BuilderTests.py b/src/engine/SCons/BuilderTests.py index 53a5628..a67d22a 100644 --- a/src/engine/SCons/BuilderTests.py +++ b/src/engine/SCons/BuilderTests.py @@ -864,6 +864,23 @@ class BuilderTestCase(unittest.TestCase): assert tgt.target_scanner == tscan, tgt.target_scanner assert tgt.source_scanner == tscan, tgt.source_scanner + def test_actual_scanner(self): + """Test usage of actual Scanner objects.""" + + import SCons.Scanner + + def func(self): + pass + + scanner = SCons.Scanner.Scanner(func, name='fooscan') + + b1 = SCons.Builder.Builder(action='bld', target_scanner=scanner) + b2 = SCons.Builder.Builder(action='bld', target_scanner=scanner) + b3 = SCons.Builder.Builder(action='bld') + + assert b1 == b2 + assert b1 != b3 + def test_src_scanner(slf): """Testing ability to set a source file scanner through a builder.""" class TestScanner: |