diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-08-25 15:33:13 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-08-25 15:33:13 +0200 |
commit | f762ee6d16ccdd40317608b11e685e2f17c06f22 (patch) | |
tree | 8424afe37359fbcde2e014eda338869947e11c2e /QMTest/TestCmd.py | |
parent | 02292cfec56d773f3e3e8607f5b7f76f97c9c874 (diff) | |
parent | 16bc58049adac72cb1f398d9f89e42757bb4a22f (diff) |
Merge tag 'upstream/2.3.3'
Upstream version 2.3.3
Diffstat (limited to 'QMTest/TestCmd.py')
-rw-r--r-- | QMTest/TestCmd.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py index b51d90f..3048973 100644 --- a/QMTest/TestCmd.py +++ b/QMTest/TestCmd.py @@ -486,7 +486,8 @@ def match_re(lines = None, res = None): """ """ if not is_List(lines): - lines = lines.split("\n") + # CRs mess up matching (Windows) so split carefully + lines = re.split('\r?\n', lines) if not is_List(res): res = res.split("\n") if len(lines) != len(res): @@ -683,7 +684,7 @@ if subprocess.mswindows: assert ol is None lpBuffer = ctypes.create_string_buffer(bufSize) bytesRead = DWORD() - bErr = ctypes.windll.kernel32.ReadFile( + bErr = ctypes.windll.kernel32.ReadFile( hFile, lpBuffer, bufSize, ctypes.byref(bytesRead), ol) if not bErr: raise ctypes.WinError() return (0, ctypes.string_at(lpBuffer, bytesRead.value)) |