[Tests] Ignore blank lines when comparing texts

This commit is contained in:
Salvador E. Tropea 2023-04-27 16:47:17 -03:00
parent 0f5d5c5381
commit 308c1fde6d
1 changed files with 1 additions and 1 deletions

View File

@ -574,7 +574,7 @@ class TestContext(object):
def compare_txt(self, text, reference=None, diff='diff.txt'): def compare_txt(self, text, reference=None, diff='diff.txt'):
if reference is None: if reference is None:
reference = text reference = text
cmd = ['/bin/sh', '-c', 'diff -ub '+os.path.join(REF_DIR, reference)+' ' + cmd = ['/bin/sh', '-c', 'diff -uBb '+os.path.join(REF_DIR, reference)+' ' +
self.get_out_path(text)+' > '+self.get_out_path(diff)] self.get_out_path(text)+' > '+self.get_out_path(diff)]
logging.debug('Comparing texts with: '+usable_cmd(cmd)) logging.debug('Comparing texts with: '+usable_cmd(cmd))
res = subprocess.call(cmd) res = subprocess.call(cmd)