assert e.get_implicit() == []
assert e.render(m) == "987 654 321 " # note trailing space
+ e.set_implicit(None)
+ assert e.get_implicit() == None, e.get_implicit()
+
+ e.set_implicit('')
+ assert e.get_implicit() == [], e.get_implicit()
+
+ e.set_implicit('foo')
+ assert e.get_implicit() == ['foo'], e.get_implicit()
+
+ e.set_implicit('foo bar')
+ assert e.get_implicit() == ['foo bar'], e.get_implicit()
+
+ e.set_implicit(['foo'])
+ assert e.get_implicit() == ['foo'], e.get_implicit()
+
+ e.set_implicit(['foo bar'])
+ assert e.get_implicit() == ['foo bar'], e.get_implicit()
+
+ e.set_implicit(['foo', 'bar'])
+ assert e.get_implicit() == ['foo', 'bar'], e.get_implicit()
+
class SConsignFileTestCase(unittest.TestCase):
def runTest(self):
return string.split(self.implicit, '\0')
def set_implicit(self, implicit):
- if not implicit:
+ if implicit is None:
self.implicit = None
else:
+ if SCons.Util.is_String(implicit):
+ implicit = [implicit]
self.implicit = string.join(map(str, implicit), '\0')