diff options
author | William Deegan <bill@baddogconsulting.com> | 2018-12-06 23:23:11 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2018-12-06 23:23:11 (GMT) |
commit | d620a79ebd590c5864656bd4bbca043e99809454 (patch) | |
tree | 86959ab71c79f466c148fea090298d30ce91eaab /testing | |
parent | ba9f2f56a7d8fd7a8305ac5dfb85664116f3b51e (diff) | |
download | SCons-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.py | 8 |
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) |