diff options
-rw-r--r-- | QMTest/TestCmd.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py index 07a3905..3b745f8 100644 --- a/QMTest/TestCmd.py +++ b/QMTest/TestCmd.py @@ -453,13 +453,17 @@ def pass_test(self = None, condition = 1, function = None): sys.exit(0) -def match_exact(lines = None, matches = None): +def match_exact(lines = None, matches = None, newline = '\n'): """ """ + + if isinstance(lines, bytes) or bytes is str: + newline = to_bytes('\n') + if not is_List(lines): - lines = lines.split("\n") + lines = lines.split(newline) if not is_List(matches): - matches = matches.split("\n") + matches = matches.split(newline) if len(lines) != len(matches): return for i in range(len(lines)): |