diff options
author | Steven Knight <knight@baldmt.com> | 2002-02-03 22:11:10 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-02-03 22:11:10 (GMT) |
commit | 5e8517111e036d0dfd191a8ad41e41bbf0950c2e (patch) | |
tree | 823a922d61b8ef25f70ca153b6cb30e1e4a6976b /src/engine/SCons/Scanner/ScannerTests.py | |
parent | e4055f33a18a5a462150a061b2b4009db0867c8c (diff) | |
download | SCons-5e8517111e036d0dfd191a8ad41e41bbf0950c2e.zip SCons-5e8517111e036d0dfd191a8ad41e41bbf0950c2e.tar.gz SCons-5e8517111e036d0dfd191a8ad41e41bbf0950c2e.tar.bz2 |
Support Scanner functions returning strings, not just Nodes.
Diffstat (limited to 'src/engine/SCons/Scanner/ScannerTests.py')
-rw-r--r-- | src/engine/SCons/Scanner/ScannerTests.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/engine/SCons/Scanner/ScannerTests.py b/src/engine/SCons/Scanner/ScannerTests.py index 99cab94..76df18e 100644 --- a/src/engine/SCons/Scanner/ScannerTests.py +++ b/src/engine/SCons/Scanner/ScannerTests.py @@ -41,11 +41,14 @@ class ScannerTestBase: def test(self, scanner, env, filename, deps, *args): self.deps = deps - deps = scanner.scan(filename, env) + scanned = scanner.scan(filename, env) + scanned_strs = map(lambda x: str(x), scanned) self.failUnless(self.filename == filename, "the filename was passed incorrectly") self.failUnless(self.env == env, "the environment was passed incorrectly") - self.failUnless(self.deps == deps, "the dependencies were returned incorrectly") + self.failUnless(scanned_strs == deps, "the dependencies were returned incorrectly") + for d in scanned: + self.failUnless(type(d) != type(""), "got a string in the dependencies") if len(args) > 0: self.failUnless(self.arg == args[0], "the argument was passed incorrectly") |