summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2018-12-06 23:23:11 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2018-12-06 23:23:11 (GMT)
commitd620a79ebd590c5864656bd4bbca043e99809454 (patch)
tree86959ab71c79f466c148fea090298d30ce91eaab /testing
parentba9f2f56a7d8fd7a8305ac5dfb85664116f3b51e (diff)
downloadSCons-d620a79ebd590c5864656bd4bbca043e99809454.zip
SCons-d620a79ebd590c5864656bd4bbca043e99809454.tar.gz
SCons-d620a79ebd590c5864656bd4bbca043e99809454.tar.bz2
Allow TestCmd.diff() to accept lists as well as strings
Diffstat (limited to 'testing')
-rw-r--r--testing/framework/TestCmd.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/testing/framework/TestCmd.py b/testing/framework/TestCmd.py
index cccbccb..35e3613 100644
--- a/testing/framework/TestCmd.py
+++ b/testing/framework/TestCmd.py
@@ -1093,7 +1093,13 @@ class TestCmd(object):
diff_function = self.simple_diff
if name is not None:
print(self.banner(name))
- args = (a.splitlines(), b.splitlines()) + args
+
+ if not is_List(a):
+ a=a.splitlines()
+ if not is_List(b):
+ b=b.splitlines()
+
+ args = (a, b) + args
for line in diff_function(*args, **kw):
print(line)