From: Leandro Lucarella Date: Sat, 17 Mar 2007 21:22:30 +0000 (+0000) Subject: Bugfix: fallaba diff por problemas de \n. X-Git-Tag: 0_9_0~50 X-Git-Url: https://git.llucax.com/software/sercom.git/commitdiff_plain/55ad2b439dc03b110ef97eee05dd5e6151b39bf3?ds=inline Bugfix: fallaba diff por problemas de \n. A un archivo se le extirpaba los \n al hacer el split por líneas y a otro no, así que daban todos los diff mal. --- diff --git a/sercom/tester.py b/sercom/tester.py index 88dbe87..abc1d90 100644 --- a/sercom/tester.py +++ b/sercom/tester.py @@ -441,7 +441,7 @@ def ejecutar_comando_fuente(self, path, entrega): #{{{ if longname is None: longname = name new = file(new, 'r').readlines() - orig = zip_in.read(name).split('\n') + orig = zip_in.read(name).splitlines(True) udiff = ''.join(list(unified_diff(orig, new, fromfile=name+'.'+origname, tofile=name+'.'+newname))) if udiff: @@ -652,7 +652,7 @@ def ejecutar_comando_prueba(self, path, prueba): #{{{ if longname is None: longname = name new = file(new, 'r').readlines() - orig = zip_in.read(name).split('\n') + orig = zip_in.read(name).splitlines(True) udiff = ''.join(list(unified_diff(orig, new, fromfile=name+'.'+origname, tofile=name+'.'+newname))) if udiff: