]> granicus.if.org Git - python/commitdiff
Fix this test on Solaris. There can be embedded \r, so don't just replace
authorNeal Norwitz <nnorwitz@gmail.com>
Wed, 26 Apr 2006 06:26:12 +0000 (06:26 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Wed, 26 Apr 2006 06:26:12 +0000 (06:26 +0000)
the one at the end.

Lib/test/test_pty.py

index 7b1f460ff116b8d7f828b61057678cb630a8f844..59e51627ddce24c4cb5687380ea654be38a0b042 100644 (file)
@@ -24,11 +24,11 @@ def normalize_output(data):
 
     # OSF/1 (Tru64) apparently turns \n into \r\r\n.
     if data.endswith('\r\r\n'):
-        return data[:-3] + '\n'
+        return data.replace('\r\r\n', '\n')
 
     # IRIX apparently turns \n into \r\n.
     if data.endswith('\r\n'):
-        return data[:-2] + '\n'
+        return data.replace('\r\n', '\n')
 
     return data