Commits

Greg Ward committed cf54d0b

Fix issue #2825: allow Node objects in Java path options.

  • Participants
  • Parent commits a9e7bcc

Comments (0)

Files changed (2)

File src/engine/SCons/Tool/javac.py

         if self.default:
             path = path + [ env[self.default] ]
         if path:
-            return [self.opt, os.pathsep.join(path)]
+            return [self.opt, os.pathsep.join(map(str, path))]
             #return self.opt + " " + os.pathsep.join(path)
         else:
             return []

File src/engine/SCons/Tool/javacTests.py

 
 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')
         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'],