diff options
author | Greg Ward <greg@gerg.ca> | 2012-03-17 19:54:15 (GMT) |
---|---|---|
committer | Greg Ward <greg@gerg.ca> | 2012-03-17 19:54:15 (GMT) |
commit | a2bfc43f503a2ffb4b3afb6feab7f73e6be518aa (patch) | |
tree | 203b3be712097a3d36491542bfd15f67ea2cad45 /src/engine/SCons/Tool/javacTests.py | |
parent | bf887c3859bc32ab98f037a5f37a2cfd4b03c6c7 (diff) | |
download | SCons-a2bfc43f503a2ffb4b3afb6feab7f73e6be518aa.zip SCons-a2bfc43f503a2ffb4b3afb6feab7f73e6be518aa.tar.gz SCons-a2bfc43f503a2ffb4b3afb6feab7f73e6be518aa.tar.bz2 |
Fix issue #2825: allow Node objects in Java path options.
Diffstat (limited to 'src/engine/SCons/Tool/javacTests.py')
-rw-r--r-- | src/engine/SCons/Tool/javacTests.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/javacTests.py b/src/engine/SCons/Tool/javacTests.py index f5b46bd..0335437 100644 --- a/src/engine/SCons/Tool/javacTests.py +++ b/src/engine/SCons/Tool/javacTests.py @@ -26,6 +26,13 @@ import unittest import SCons.Tool.javac +class DummyNode(object): + def __init__(self, val): + self.val = val + + def __str__(self): + return str(self.val) + class pathoptTestCase(unittest.TestCase): def assert_pathopt(self, expect, path): popt = SCons.Tool.javac.pathopt('-foopath', 'FOOPATH') @@ -54,6 +61,14 @@ class pathoptTestCase(unittest.TestCase): finally: os.pathsep = save + def test_node(self): + self.assert_pathopt(['-foopath', '/foo'], + DummyNode('/foo')) + + def test_list_node(self): + self.assert_pathopt(['-foopath', '/foo:/bar'], + ['/foo', DummyNode('/bar')]) + def test_default(self): popt = SCons.Tool.javac.pathopt('-foopath', 'FOOPATH', default='DPATH') env = {'FOOPATH': ['/foo', '/bar'], |